Splitter Buttons
The split panels can be collapsed to a particular direction via the splitter`s navigation buttons.
In order to use the splitter buttons the following properties need to be set to true.
Show Splitter Buttons
this.radSplitContainer1.EnableCollapsing = true;
this.radSplitContainer1.UseSplitterButtons = true;
Me.RadSplitContainer1.EnableCollapsing = True
Me.RadSplitContainer1.UseSplitterButtons = True
Since R3 2020 SP1 RadSplitContaiter comes with left and right arrow buttons on every SplitterElement for easier navigation. Thus, the users are able to collapse the SplitPanels to desired location.
The control also exposes a convenient API for accessing the splitter elements. Each of the splitters can be moved to a position so that it collapses one of its associated panel. The responsible MoveSplitter method receives a splitter element instance and a RadDirection flag as parameters. The splitter`s position can be restored to its previous location with the RestoreSplitterPosition method.
Collapse Splitter
this.radSplitContainer1.MoveSplitter(this.radSplitContainer1.Splitters[0], RadDirection.Left);
Me.RadSplitContainer1.MoveSplitter(Me.RadSplitContainer1.Splitters(0), RadDirection.Left)
Expand Splitter
this.radSplitContainer1.RestoreSplitterPosition(this.radSplitContainer1.Splitters[0]);
Me.RadSplitContainer1.RestoreSplitterPosition(Me.RadSplitContainer1.Splitters(0))
Since R3 2020 SP1 RadSplitContainer offers DefaultCollapseDirection property that indicates the default collapse direction when performing a double click on SplitterElement to collapse a SplitPanel.
For horizontal splitters you can set RadDirection.Up or RadDirection.Down. For vertical splitters you can set RadDirection.Left or RadDirection.Right. Here is an example how you can change the collapse direction to right when you have vertical splitters which direction by default is left:
this.radSplitContainer1.Splitters[0].DefaultCollapseDirection = RadDirection.Right;
Me.RadSplitContainer1.Splitters(0).DefaultCollapseDirection = RadDirection.Right
If you set RadDirection.Up/RadDirection.Down on vertical splitters or RadDirection.Left/RadDirection.Right on horizontal splitters an InvalidEnumArgumentException will be thrown.