alexa
Syncfusion
menu Syncfusion

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ToggleButton

    Represents the ToggleButton class.

    Inheritance
    object
    SfView
    ToggleButton
    SfCheckBox
    SfRadioButton
    Implements
    IDrawableLayout
    IDrawable
    IAbsoluteLayout
    ILayout
    IView
    IElement
    ITransform
    IContainer
    IList<IView>
    ICollection<IView>
    IEnumerable<IView>
    IEnumerable
    ISafeAreaView
    IPadding
    ICrossPlatformLayout
    IVisualTreeElement
    Inherited Members
    SfView.ArrangeContent(Rect)
    SfView.ArrangeOverride(Rect)
    SfView.Children
    SfView.ClipToBounds
    SfView.GetSemanticsNodesCore(double, double)
    SfView.MeasureContent(double, double)
    SfView.MeasureOverride(double, double)
    SfView.OnBindingContextChanged()
    SfView.OnDraw(ICanvas, RectF)
    SfView.OnHandlerChanged()
    Namespace: Syncfusion.Maui.Buttons
    Assembly: Syncfusion.Maui.Buttons.dll
    Syntax
    public abstract class ToggleButton : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement

    Constructors

    ToggleButton()

    Initializes a new instance of the ToggleButton class.

    Declaration
    public ToggleButton()

    Fields

    CheckedColorProperty

    Backing store for CheckedColor property.

    Declaration
    public static readonly BindableProperty CheckedColorProperty
    Field Value
    Type
    BindableProperty

    ContentSpacingProperty

    Gets or sets the ContentSpacing for ToggleButton. This is a Bindable property.

    Declaration
    public static readonly BindableProperty ContentSpacingProperty
    Field Value
    Type
    BindableProperty

    ControlSizeProperty

    Backing store for Control size property.

    Declaration
    public static readonly BindableProperty ControlSizeProperty
    Field Value
    Type
    BindableProperty

    EnabledAnimationProperty

    Gets or sets the EnabledAnimation for ToggleButton. This is a Bindable property.

    Declaration
    public static readonly BindableProperty EnabledAnimationProperty
    Field Value
    Type
    BindableProperty

    FlowDirectionProperty

    Backing store for FlowDirection property.

    Declaration
    public static readonly BindableProperty FlowDirectionProperty
    Field Value
    Type
    BindableProperty

    FontAttributesProperty

    Gets or sets a value that indicates whether the font for the Text is bold, italic, or neither.

    Declaration
    public static readonly BindableProperty FontAttributesProperty
    Field Value
    Type
    BindableProperty

    FontAutoScalingEnabledProperty

    Identifies the FontAutoScalingEnabled bindable property.

    Declaration
    public static readonly BindableProperty FontAutoScalingEnabledProperty
    Field Value
    Type Description
    BindableProperty

    The identifier for FontAutoScalingEnabled bindable property.

    FontFamilyProperty

    Gets or sets the font family to which the font for theText belongs.

    Declaration
    public static readonly BindableProperty FontFamilyProperty
    Field Value
    Type
    BindableProperty

    FontSizeProperty

    Gets or sets the size of the font for Text.

    Declaration
    public static readonly BindableProperty FontSizeProperty
    Field Value
    Type
    BindableProperty

    HorizontalTextAlignmentProperty

    Backing store for HorizontalTextAlignment property.

    Declaration
    public static readonly BindableProperty HorizontalTextAlignmentProperty
    Field Value
    Type
    BindableProperty

    IsEnabledProperty

    Backing store for IsEnabledProperty.

    Declaration
    public static readonly BindableProperty IsEnabledProperty
    Field Value
    Type
    BindableProperty

    PaddingProperty

    Identifies the Padding bindable property.

    Declaration
    public static readonly BindableProperty PaddingProperty
    Field Value
    Type
    BindableProperty

    StrokeThicknessProperty

    Backing store for StrokeThickness property.

    Declaration
    public static readonly BindableProperty StrokeThicknessProperty
    Field Value
    Type
    BindableProperty

    TextColorProperty

    Backing store for TextColor property.

    Declaration
    public static readonly BindableProperty TextColorProperty
    Field Value
    Type
    BindableProperty

    TextProperty

    Backing store for Text property.

    Declaration
    public static readonly BindableProperty TextProperty
    Field Value
    Type
    BindableProperty

    UncheckedColorProperty

    Backing store for UnCheckedColor property.

    Declaration
    public static readonly BindableProperty UncheckedColorProperty
    Field Value
    Type
    BindableProperty

    Properties

    CheckedColor

    Gets or sets the fill color of the ToggleButton when the CheckedColor property value is changed.

    Declaration
    public Color CheckedColor { get; set; }
    Property Value
    Type
    Color

    ContentSpacing

    Gets or sets a value that can be used to customize the gap between the toggle button and text.

    Declaration
    public double ContentSpacing { get; set; }
    Property Value
    Type Description
    double

    It accepts double values and the default value is 13.

    ControlSize

    Gets or sets the value that can be used to customize the size of the control.

    Declaration
    public double ControlSize { get; set; }
    Property Value
    Type Description
    double

    The default value is 18.

    EnabledAnimation

    Gets or sets a value indicating whether to enable animation.

    Declaration
    public bool EnabledAnimation { get; set; }
    Property Value
    Type Description
    bool

    It accepts Boolean values and the default values is true.

    FlowDirection

    Gets or sets the value of FlowDirection.

    Declaration
    public FlowDirection FlowDirection { get; set; }
    Property Value
    Type
    FlowDirection

    FontAttributes

    Gets or sets a value that indicates whether the font for the Text is bold, italic, or neither.

    Declaration
    public FontAttributes FontAttributes { get; set; }
    Property Value
    Type
    FontAttributes

    FontAutoScalingEnabled

    Gets or sets a value that Determines whether or not the font of the control should scale automatically according to the operating system settings.

    Declaration
    public bool FontAutoScalingEnabled { get; set; }
    Property Value
    Type Description
    bool

    It accepts Boolean values, and the default value is false.

    FontFamily

    Gets or sets the font used to display text in the control.

    Declaration
    public string FontFamily { get; set; }
    Property Value
    Type
    string

    FontSize

    Gets or sets the size of the text in this control.

    Declaration
    [TypeConverter(typeof(FontSizeConverter))]
    public double FontSize { get; set; }
    Property Value
    Type
    double

    HorizontalTextAlignment

    Gets or sets the horizontal alignment of the text in this content.

    Declaration
    public TextAlignment HorizontalTextAlignment { get; set; }
    Property Value
    Type
    TextAlignment

    IsEnabled

    Gets or sets the value of IsEnabled.

    Declaration
    public bool IsEnabled { get; set; }
    Property Value
    Type
    bool

    Padding

    Gets or sets a value that can be used to adjust the padding for the Control.

    Declaration
    public Thickness Padding { get; set; }
    Property Value
    Type Description
    Thickness

    It accepts a Thickness value, allowing customization of left, top, right, and bottom padding. The default value is 13,0,0,0.

    StrokeThickness

    Gets or sets the stroke thickness for the ToggleButton. The stroke thickness will be visible only if the stroke is not set to transparent.

    Declaration
    public double StrokeThickness { get; set; }
    Property Value
    Type
    double

    Text

    Gets or sets the Text.

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    string

    TextColor

    Gets or sets the color of the text in this control.

    Declaration
    public Color TextColor { get; set; }
    Property Value
    Type
    Color

    UncheckedColor

    Gets or sets the stroke color of the ToggleButton when the UnCheckedColor property value is changed.

    Declaration
    public Color UncheckedColor { get; set; }
    Property Value
    Type
    Color

    Events

    StateChanged

    Event handles when value of the IsChecked property changed.

    Declaration
    public event EventHandler<StateChangedEventArgs>? StateChanged
    Event Type
    Type
    EventHandler<StateChangedEventArgs>

    StateChanging

    Occurs when the state is changing in SfCheckBox

    Declaration
    public event EventHandler<StateChangingEventArgs>? StateChanging
    Event Type
    Type
    EventHandler<StateChangingEventArgs>

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    IList<T>
    ICollection<T>
    IEnumerable<T>
    IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved