Class 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 he panes is draggable to resize both panes. Both horizontal and vertical modes are supported. Requires exactly two child elements to operate.
Inherited Members
Namespace: UnityEngine.UIElements
Syntax
public class TwoPaneSplitView : VisualElement, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle
Constructors
TwoPaneSplitView()
Declaration
public TwoPaneSplitView()
TwoPaneSplitView(Int32, Single, TwoPaneSplitViewOrientation)
Parameterized constructor.
Declaration
public TwoPaneSplitView(int fixedPaneIndex, float fixedPaneStartDimension, TwoPaneSplitViewOrientation orientation)
Parameters
Type | Name | Description |
---|---|---|
Int32 | fixedPaneIndex | 0 for setting first child as the fixed pane, 1 for the second child element. |
Single | fixedPaneStartDimension | Set an inital width or height for the fixed pane. |
TwoPaneSplitViewOrientation | orientation | Orientation of the split view. |
Properties
contentContainer
Declaration
public override VisualElement contentContainer { get; }
Property Value
Type | Description |
---|---|
VisualElement |
Overrides
fixedPane
The child element that is set as the fixed size pane.
Declaration
public VisualElement fixedPane { get; }
Property Value
Type | Description |
---|---|
VisualElement |
fixedPaneIndex
0 for setting first child as the fixed pane, 1 for the second child element.
Declaration
public int fixedPaneIndex { get; set; }
Property Value
Type | Description |
---|---|
Int32 |
fixedPaneInitialDimension
The initial width or height for the fixed pane.
Declaration
public float fixedPaneInitialDimension { get; set; }
Property Value
Type | Description |
---|---|
Single |
flexedPane
The child element that is set as the flexable size pane.
Declaration
public VisualElement flexedPane { get; }
Property Value
Type | Description |
---|---|
VisualElement |
orientation
Orientation of the split view.
Declaration
public TwoPaneSplitViewOrientation orientation { get; set; }
Property Value
Type | Description |
---|---|
TwoPaneSplitViewOrientation |
Methods
CollapseChild(Int32)
Collapse one of the panes of the split view. This will hide the resizer and make the other child take up all available space.
Declaration
public void CollapseChild(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | Index of child to collapse. |
UnCollapse()
Un-collapse the split view. This will restore the split view to the state it was before the previous collapse.
Declaration
public void UnCollapse()