Class SfGridSplitter
A layout control that arranges content in resizable panes separated by draggable splitters. Supports pane resizing, collapse/expand operations, size constraints, RTL layouts, and keyboard and accessibility interactions.
Implements
Namespace: Syncfusion.Maui.Toolkit.GridSplitter
Assembly: Syncfusion.Maui.Toolkit.dll
Syntax
public class SfGridSplitter : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IParentThemeElement, IThemeElement
Constructors
SfGridSplitter()
Initializes a new instance of the SfGridSplitter class.
Declaration
public SfGridSplitter()
Fields
ExpandCollapseIconColorProperty
Identifies the ExpandCollapseIconColor bindable property.
Declaration
public static readonly BindableProperty ExpandCollapseIconColorProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
OrientationProperty
Identifies the Orientation bindable property.
Declaration
public static readonly BindableProperty OrientationProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
ResizeIconColorProperty
Identifies the ResizeIconColor bindable property.
Declaration
public static readonly BindableProperty ResizeIconColorProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
ResizeIconTemplateProperty
Identifies the ResizeIconTemplate bindable property.
Declaration
public static readonly BindableProperty ResizeIconTemplateProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
SeparatorBackgroundProperty
Identifies the SeparatorBackground bindable property.
Declaration
public static readonly BindableProperty SeparatorBackgroundProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
SeparatorSizeProperty
/// Identifies the SeparatorSize bindable property.
Declaration
public static readonly BindableProperty SeparatorSizeProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
SplitterPanesProperty
Identifies the SplitterPanes bindable property.
Declaration
public static readonly BindableProperty SplitterPanesProperty
Field Value
| Type |
|---|
| Microsoft.Maui.Controls.BindableProperty |
Properties
ExpandCollapseIconColor
Gets or sets the color used to draw the floating expand/collapse buttons and the accent line drawn down/across the separator strip in the hovered (or sticky-hovered) state.
Declaration
public Color ExpandCollapseIconColor { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Graphics.Color |
Orientation
Gets or sets the orientation of the splitter layout.
Declaration
public GridSplitterOrientation Orientation { get; set; }
Property Value
| Type |
|---|
| GridSplitterOrientation |
Remarks
Horizontal (default): Panes arranged side-by-side (columns), separators are vertical Vertical: Panes stacked vertically (rows), separators are horizontal
Changing this property rebuilds the layout.
ResizeIconColor
Gets or sets the color used to draw the resize handle (the small bar icon drawn in the middle of the separator) and the accent line drawn down/across the separator strip in the default (non-interactive) state.
Declaration
public Color ResizeIconColor { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Graphics.Color |
ResizeIconTemplate
Gets or sets an optional data template for custom resize icons on separators.
Declaration
public DataTemplate ResizeIconTemplate { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.DataTemplate |
SeparatorBackground
Gets or sets the background brush for separators in the default (non-interacting) state.
Declaration
public Brush SeparatorBackground { get; set; }
Property Value
| Type |
|---|
| Microsoft.Maui.Controls.Brush |
SeparatorSize
Gets or sets the size (width or height) of each separator .
Declaration
public double SeparatorSize { get; set; }
Property Value
| Type |
|---|
| System.Double |
SplitterPanes
Gets or sets the panes of the splitter.
Declaration
public ObservableCollection<SplitterPane> SplitterPanes { get; set; }
Property Value
| Type |
|---|
| System.Collections.ObjectModel.ObservableCollection<SplitterPane> |
Methods
AddPane(SplitterPane)
Adds a new pane to the splitter.
Declaration
public void AddPane(SplitterPane pane)
Parameters
| Type | Name | Description |
|---|---|---|
| SplitterPane | pane | The pane to add. Must not be |
Remarks
The pane is added to the end of the SplitterPanes collection and the layout is automatically rebuilt.
ArrangeContent(Rect)
CrossPlatformArrange entry point.
Arranges the splitter's child views manually so the
separator strips are arranged BEFORE the floating
expand/collapse buttons are positioned (the button positions
depend on each separator's arranged bounds). The base
Syncfusion.Maui.Toolkit.SfView.ArrangeContent(Microsoft.Maui.Graphics.Rect) is then called to let
the layout manager arrange the children at their
AbsoluteLayout.LayoutBounds.
Declaration
protected override Size ArrangeContent(Rect bounds)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.Maui.Graphics.Rect | bounds |
Returns
| Type |
|---|
| Microsoft.Maui.Graphics.Size |
Overrides
CollapsePane(Int32)
Collapses the pane at the specified index. Triggers the Collapsing and Collapsed events.
Declaration
public Task CollapsePane(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The zero-based index of the pane to collapse. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
|
ExpandPane(Int32)
Declaration
public Task ExpandPane(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The zero-based index of the pane to expand. |
Returns
| Type | Description |
|---|---|
| System.Threading.Tasks.Task |
|
RemovePane(Int32)
Removes a pane from the splitter.
Declaration
public void RemovePane(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | The zero-based index of the pane to remove. |
Remarks
The pane at the specified index is removed, and the layout is automatically rebuilt.
Events
Collapsed
Raised after a pane has been successfully collapsed.
Declaration
public event EventHandler<GridSplitterPaneCollapsedEventArgs> Collapsed
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterPaneCollapsedEventArgs> |
Collapsing
Raised when a pane collapse operation is starting.
Declaration
public event EventHandler<GridSplitterPaneCollapsingEventArgs> Collapsing
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterPaneCollapsingEventArgs> |
Expanded
Raised after a pane has been successfully expanded.
Declaration
public event EventHandler<GridSplitterPaneExpandedEventArgs> Expanded
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterPaneExpandedEventArgs> |
Expanding
Raised when a pane expand operation is starting.
Declaration
public event EventHandler<GridSplitterPaneExpandingEventArgs> Expanding
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterPaneExpandingEventArgs> |
ResizeStarted
Raised when a resize operation is starting (pointer pressed on separator).
Declaration
public event EventHandler<GridSplitterResizeStartedEventArgs> ResizeStarted
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterResizeStartedEventArgs> |
ResizeStopped
Raised when a resize operation completes (pointer released).
Declaration
public event EventHandler<GridSplitterResizeStoppedEventArgs> ResizeStopped
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterResizeStoppedEventArgs> |
Resizing
Raised continuously during a resize operation (pointer move).
Declaration
public event EventHandler<GridSplitterResizingEventArgs> Resizing
Event Type
| Type |
|---|
| System.EventHandler<GridSplitterResizingEventArgs> |