TwoPaneSplitView
A SplitView that contains two resizable panes. One pane is fixed-size while the other pane has flex-grow style set to 1 to take all remaining space. The border between the panes is draggable to resize both panes. Both horizontal and vertical modes are supported. Requires exactly two child elements to operate.
Read time 8 minutesLast updated 8 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: VisualElement
- Implements: IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
[UxmlElement][Icon("UIToolkit/Icons/TwoPaneSplitView.png")]public class TwoPaneSplitView : VisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle
Constructors
Constructor | Description |
|---|---|
| TwoPaneSplitView() | Parameterized constructor. |
| TwoPaneSplitView(System.Int32,System.Single,UnityEngine.UIElements.TwoPaneSplitViewOrientation) | Parameterized constructor. |
Properties
Property | Description |
|---|---|
| fixedPane | The child element that is set as the fixed size pane. |
| fixedPaneIndex | 0 for setting first child as the fixed pane, 1 for the second child element. |
| fixedPaneInitialDimension | The initial width or height for the fixed pane. |
| flexedPane | The child element that is set as the flexable size pane. |
| orientation | Orientation of the split view. |
Methods
Method | Description |
|---|---|
| CollapseChild | Collapse one of the panes of the split view. This will hide the resizer and make the other child take up all available space. |
| UnCollapse | Un-collapse the split view. This will restore the split view to the state it was before the previous collapse. |