New to Telerik UI for .NET MAUI? Start a free 30-day trial

Represents the control that redistributes space between columns or rows of a Grid control. The GridSplitter can be located in its own row or column or it can be placed together with another element in the row or column. When it shares a row or column with another element, it should be declared last in the Grid in order to appear on top of the other element.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

C#
public class RadGridSplitter : RadBorderContentView, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout

Inheritance: objectRadContentViewRadCompositeContentViewRadBorderContentViewRadGridSplitter

Implements: IContentViewICrossPlatformLayoutIElementIPaddingIRadContentViewITransformIView...

Inherited Members RadBorderContentView.BackgroundColorPropertyRadBorderContentView.BackgroundPropertyRadBorderContentView.BorderColorPropertyRadBorderContentView.BorderBrushPropertyRadBorderContentView.BorderThicknessPropertyRadBorderContentView.CornerRadiusPropertyRadBorderContentView.ContentPaddingPropertyRadBorderContentView.BackgroundColorRadBorderContentView.BackgroundRadBorderContentView.BorderColorRadBorderContentView.BorderBrushRadBorderContentView.BorderThicknessRadBorderContentView.CornerRadiusRadBorderContentView.ContentPaddingRadCompositeContentView.StylePropertyRadCompositeContentView.ControlTemplatePropertyRadCompositeContentView.OnBindingContextChanged()RadCompositeContentView.OnPropertyChanged(string)RadCompositeContentView.StyleRadCompositeContentView.ControlTemplateRadContentView.ActualStyleClassPropertyRadContentView.OnChildAdded(Element)RadContentView.OnChildRemoved(Element, int)RadContentView.OnHandlerChanged()...

Example:

Example of the GridSplitter placed in its own row:

csharp
<Grid RowDefinitions="*, Auto, *">
    <Label Text="Row 0 Col 0"
           Background="Azure"
           Grid.Row="0"/>
    <telerik:RadGridSplitter VerticalOptions="Start"
                             HorizontalOptions="Fill"
                             ResizeBehavior="PreviousAndNext"
                             Grid.Row="1"/>
    <Label Text="Row 1 Col 0"
           Background="Moccasin"
           Grid.Row="2"/>
</Grid>

Example of the GridSplitter placed with another element in the row:

csharp
<Grid RowDefinitions="*, *, *">
    <Label Text="Row 0 Col 0"
           Background="Azure"
           Grid.Row="0"/>
    <Label Text="Row 1 Col 0"
            Margin="0,16,0,0"
           Background="Moccasin"
           Grid.Row="1"/>
    <Label Text="Row 2 Col 0"
           Background="LightPink"
           Grid.Row="2"/>
    <telerik:RadGridSplitter VerticalOptions="Start"
                             HorizontalOptions="Fill"
                             ResizeBehavior="PreviousAndNext"
                             Grid.Row="1"/>
</Grid>

Constructors

Initializes a new instance of the RadGridSplitter class.

C#
public RadGridSplitter()

Fields

GripperColorProperty

BindableProperty

Identifies the GripperColor property.

C#
public static readonly BindableProperty GripperColorProperty

ParentLevelProperty

BindableProperty

Identifies the ParentLevel property.

C#
public static readonly BindableProperty ParentLevelProperty

ResizeBehaviorProperty

BindableProperty

Identifies the ResizeBehavior property.

C#
public static readonly BindableProperty ResizeBehaviorProperty

ResizeDirectionProperty

BindableProperty

Identifies the ResizeDirection property.

C#
public static readonly BindableProperty ResizeDirectionProperty

Properties

Gets or sets the color of the gripper.

C#
public Color GripperColor { get; set; }

Gets or sets the level of the parent grid to resize. It is useful when the GridSplitter is placed in a nested grid, but it is intended to resize rows/columns of the outer grid. A value of 0 targets the direct parent grid, 1 targets the parent's parent grid, and so on.

C#
public int ParentLevel { get; set; }
Example:
C#
&lt;Grid&gt;
&lt;Grid x:Name="MainGrid" Margin="20"&gt;
&lt;Grid.ColumnDefinitions&gt;
&lt;ColumnDefinition Width="*" /&gt;
&lt;ColumnDefinition Width="*" /&gt;
&lt;ColumnDefinition Width="Auto" /&gt;
&lt;ColumnDefinition Width="*" /&gt;
&lt;/Grid.ColumnDefinitions&gt;
&lt;BoxView Grid.Column="0" Color="LightBlue" /&gt;
&lt;BoxView Grid.Column="1" Color="LightGreen" /&gt;
&lt;Grid Grid.Column="2"&gt;
&lt;Grid.ColumnDefinitions&gt;
&lt;ColumnDefinition Width="20" /&gt;
&lt;ColumnDefinition Width="Auto" /&gt;
&lt;/Grid.ColumnDefinitions&gt;
&lt;BoxView Grid.Column="0" Color="LightSalmon" /&gt;
&lt;telerik:RadGridSplitter x:Name="ColumnSplitter"
Grid.Column="1"
ParentLevel="1"
Width="10"
ResizeDirection="Columns"
ResizeBehavior="PreviousAndNext"
GripperColor="Gray" /&gt;
&lt;/Grid&gt;
&lt;BoxView Grid.Column="3" Color="LightPink" /&gt;
&lt;/Grid&gt;
&lt;/Grid&gt;

Gets or sets which Columns or Rows the Splitter resizes.

C#
public RadGridSplitter.GridResizeBehavior ResizeBehavior { get; set; }

Gets or sets whether the Splitter resizes the Columns, Rows, or Both.

C#
public RadGridSplitter.GridResizeDirection ResizeDirection { get; set; }

Methods

C#
protected override void ChangeVisualState()
C#
protected override void OnApplyTemplate()

Overrides: RadCompositeContentView.OnApplyTemplate()