menu

Xamarin.Forms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ToolbarItem - Xamarin.Forms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ToolbarItem

    Represents ToolbarItem class.

    Inheritance
    System.Object
    ToolbarItem
    FooterToolbarItem
    HeaderToolbarItem
    Namespace: Syncfusion.SfImageEditor.XForms
    Assembly: Syncfusion.SfImageEditor.XForms.dll
    Syntax
    public class ToolbarItem : BindableObject

    Constructors

    ToolbarItem()

    Initializes a new instance of the ToolbarItem class.

    Declaration
    public ToolbarItem()

    Fields

    IconHeightProperty

    Gets or sets Icon Height.

    Declaration
    public static readonly BindableProperty IconHeightProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    IconProperty

    Gets or sets toolbar text. It is a bindable property.

    Declaration
    public static readonly BindableProperty IconProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    NameProperty

    Gets or sets toolbar item name. It is a bindable property.

    Declaration
    public static readonly BindableProperty NameProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    TextHeightProperty

    Gets or sets Text Height.

    Declaration
    public static readonly BindableProperty TextHeightProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    TextProperty

    Gets or sets toolbar text. It is a bindable property.

    Declaration
    public static readonly BindableProperty TextProperty
    Field Value
    Type
    Xamarin.Forms.BindableProperty

    Properties

    Icon

    To get and set Icon value to toolbar item.

    Declaration
    public ImageSource Icon { get; set; }
    Property Value
    Type Description
    Xamarin.Forms.ImageSource

    This property takes the Xamarin.Forms.ImageSource as value.

    Examples

    This sample shows how to set the Icon for toolbar menu item.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.ToolbarSettings.ToolbarItems.Add(new HeaderToolbarItem() { Icon= ImageSource.FromResource(“NameSpace.imageName.jpg”) });
    }

    IconHeight

    To get and set IconHeight value for toolbar item.

    Declaration
    public double IconHeight { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the icon height for toolbar menu item.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.ToolbarSettings.ToolbarItems.Add(new HeaderToolbarItem() {IconHeight =50});
    }

    Name

    To get and set Name value for toolbar item.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    This property takes the System.String as value.

    Examples

    This sample shows how to set the name for toolbar menu item.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        var name = editor.ToolbarSettings.ToolbarItems[0].Name;
    }

    Text

    To get and set text value to toolbar item.

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    System.String

    This property takes the System.String as value.

    Examples

    This sample shows how to set the Text for toolbar menu item.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.ToolbarSettings.ToolbarItems.Add(new HeaderToolbarItem() { Text = "HeaderItem" });
    }

    TextHeight

    To get and set TextHeight value for toolbar item.

    Declaration
    public double TextHeight { get; set; }
    Property Value
    Type Description
    System.Double

    This property takes the System.Double as value.

    Examples

    This sample shows how to set the text height for toolbar menu item.

    Public MyPage()
    {
        SfImageEditor imageEditor = new SfImageEditor();
        imageEditor.ToolbarSettings.ToolbarItems.Add(new HeaderToolbarItem() {TextHeight =50});
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved