menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class SeparatorToolbarItem - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class SeparatorToolbarItem

    Represents the SeparatorToolbarItem class.

    Inheritance
    System.Object
    BaseToolbarItem
    SeparatorToolbarItem
    Inherited Members
    BaseToolbarItem.Alignment
    BaseToolbarItem.AlignmentProperty
    Namespace: Syncfusion.Maui.Toolbar
    Assembly: Syncfusion.Maui.Toolbar.dll
    Syntax
    public class SeparatorToolbarItem : BaseToolbarItem, IThemeElement

    Constructors

    SeparatorToolbarItem()

    Initializes a new instance of the SeparatorToolbarItem class.

    Declaration
    public SeparatorToolbarItem()

    Fields

    SizeProperty

    Identifies the Size bindable property.

    Declaration
    public static readonly BindableProperty SizeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    Gets or sets the size of the separator item.

    StrokeProperty

    Identifies the Stroke bindable property.

    Declaration
    public static readonly BindableProperty StrokeProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the Stroke bindable property.

    StrokeThicknessProperty

    Identifies the StrokeThickness bindable property.

    Declaration
    public static readonly BindableProperty StrokeThicknessProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the StrokeThickness bindable property.

    Properties

    Size

    Gets or sets the separtor size.

    Declaration
    public double Size { get; set; }
    Property Value
    Type
    System.Double
    Examples

    The below example shows how to use the size property of the separatorToolbarItem.

    • XAML
    • C#
    <toolbar:SfToolbar x:Name="Toolbar"
                       HeightRequest="56"
                       Orientation="Horizontal">
        <toolbar:SfToolbar.Items>
            <toolbar:SeparatorToolbarItem Size="20"/>
        </toolbar:SfToolbar.Items>
    </toolbar:SfToolbar>
    SfToolbar toolbar = new SfToolbar();
    toolbar.HeightRequest = 56;
    toolbar.Orientation = ToolbarOrientation.Horizontal;
    SeparatorToolbarItem separator = new SeparatorToolbarItem()
    {
        Size = 20
    };
    toolbar.Items.Add(separator);
    this.Content = toolbar;

    Stroke

    Gets or sets the color for the separator border.

    Declaration
    public Color Stroke { get; set; }
    Property Value
    Type
    Microsoft.Maui.Graphics.Color
    Examples

    The below example shows how to use the stroke in separatorToolbarItem.

    • XAML
    • C#
    <toolbar:SfToolbar x:Name="Toolbar"
                       HeightRequest="56"
                       Orientation="Horizontal">
        <toolbar:SfToolbar.Items>
            <toolbar:SeparatorToolbarItem Stroke="Red"/>
        </toolbar:SfToolbar.Items>
    </toolbar:SfToolbar>
    SfToolbar toolbar = new SfToolbar();
    toolbar.HeightRequest = 56;
    toolbar.Orientation = ToolbarOrientation.Horizontal;
    SeparatorToolbarItem separator = new SeparatorToolbarItem()
    {
        Stroke = Colors.Red
    };
    toolbar.Items.Add(separator);
    this.Content = toolbar;

    StrokeThickness

    Gets or sets the thickness for the separator border.

    Declaration
    public double StrokeThickness { get; set; }
    Property Value
    Type
    System.Double
    Examples

    the below example shows how to set the stroke thickness property of the separatorToolbarItem.

    • XAML
    • C#
    <toolbar:SfToolbar x:Name="Toolbar"
                       HeightRequest="56"
                       Orientation="Horizontal">
        <toolbar:SfToolbar.Items>
            <toolbar:SeparatorToolbarItem StrokeThickness="5"/>
        </toolbar:SfToolbar.Items>
    </toolbar:SfToolbar>
    SfToolbar toolbar = new SfToolbar();
    toolbar.HeightRequest = 56;
    toolbar.Orientation = ToolbarOrientation.Horizontal;
    SeparatorToolbarItem separator = new SeparatorToolbarItem()
    {
        StrokeThickness = 5
    };
    toolbar.Items.Add(separator);
    this.Content = toolbar;
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved