RadzenBody and RadzenSidebar expand from code

RadzenBody and RadzenSidebar have property @bind-Expanded
I want to make it to be save per user in local session. But when I try to set the value from code behind in OnAfterRender or OnInitialized method then it has no result in the UI.
when I set expanded to true / false it is always visible.
Is it possible somehow to make it from code behind ?

We use similar approach in our online demo. Check the MainLayout: https://github.com/radzenhq/radzen-blazor/blob/master/RadzenBlazorDemos/Shared/MainLayout.razor

Yes i know about the demo. And i have the code from there.
But if I add additional in code behind something like this

 bool sidebarExpanded = true;
 bool bodyExpanded = false;

protected override void OnAfterRender(bool firstRender)
        if (firstRender)
            sidebarExpanded = false;
            bodyExpanded = true;

then there is no change in the UI. the sidebar is shown etc.

You can try setting the Responsive property of the sidebar to false.

This was this. now all work fine. thx for help