The expandability/collapsibility of RadzenSplitterPane

If I declare RadzenSpliterPane without specifying the Collapsed attribute, the pane can be expanded or collapsed either on the UI or controlled by my C# code by setting the Collapsed property.

However, if I specify the Collapsed attribute as below, the expandability or collapsibility of the pane becomes frozen - it remains collapsed or expanded depending on the value of Collapsed attribute and I cannot expand or collapse it either on the UI or in the code.

I am using "Radzen.Blazor" version 3.19.4.

<RadzenSplitterPane @ref="@_treePane" Size="250px" Collapsed="true">
     <div style="height: 100%; width: 100%; overflow: auto;">
          <RadzenTree @ref="@_tree">
              <RadzenTreeLevel TextProperty="@nameof(TreeViewGroup.Name)" ChildrenProperty="@nameof(TreeViewGroup.Items)" />
              <RadzenTreeLevel TextProperty="@nameof(TreeViewGroupItem.Name)" HasChildren="@((env) => false)"Template="@_generateLink" />
            </RadzenTree>
     </div>
</RadzenSplitterPane>

Yes, when a value of a property is hardcoded this is expected - you might need to use a field/property instead.

@enchev Can you elaborate your suggestion a bit?

I want the SplitterPane to be collapsed initially, but can later be expanded on the UI or by the code.

It works better now when I bind Collapsed attribute to a variable - the splitter pane is initialized as collapsed and can later be expanded by code. So what's the difference between using a constant ("true") and using a variable?

<RadzenSplitterPane @ref="@_treePane" Size="250px" Collapsed="@_treePaneCollapsed">
     <div style="height: 100%; width: 100%; overflow: auto;">
          <RadzenTree @ref="@_tree">
              <RadzenTreeLevel TextProperty="@nameof(TreeViewGroup.Name)" ChildrenProperty="@nameof(TreeViewGroup.Items)" />
              <RadzenTreeLevel TextProperty="@nameof(TreeViewGroupItem.Name)" HasChildren="@((env) => false)"Template="@_generateLink" />
            </RadzenTree>
     </div>
</RadzenSplitterPane>

bool _treePaneCollapsed = true;

The only problem remains is that the splitter pane UI does not respond to mouse to collapse:

image

To make the collapse and expand operation work on the UI, I need to register Collapse and Expand callbacks on RadzenSplitter and set the bound variable appropriately.