Class ToggleButton
Represents the ToggleButton class.
Implements
Inherited Members
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, ISemanticsProvider, ITextElement
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 |
---|
Microsoft.Maui.Controls.BindableProperty |
ControlSizeProperty
Backing store for Control size property.
Declaration
public static readonly BindableProperty ControlSizeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
EnabledAnimationProperty
Gets or sets the EnabledAnimation for ToggleButton. This is a Bindable property.
Declaration
public static readonly BindableProperty EnabledAnimationProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
FlowDirectionProperty
Backing store for FlowDirection property.
Declaration
public static readonly BindableProperty FlowDirectionProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.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 |
---|
Microsoft.Maui.Controls.BindableProperty |
FontAutoScalingEnabledProperty
Identifies the FontAutoScalingEnabled bindable property.
Declaration
public static readonly BindableProperty FontAutoScalingEnabledProperty
Field Value
Type | Description |
---|---|
Microsoft.Maui.Controls.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 |
---|
Microsoft.Maui.Controls.BindableProperty |
FontSizeProperty
Gets or sets the size of the font for Text.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
HorizontalTextAlignmentProperty
Backing store for HorizontalTextAlignment property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
IsEnabledProperty
Backing store for IsEnabledProperty.
Declaration
public static readonly BindableProperty IsEnabledProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
StrokeThicknessProperty
Backing store for StrokeThickness property.
Declaration
public static readonly BindableProperty StrokeThicknessProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TextColorProperty
Backing store for TextColor property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
TextProperty
Backing store for Text property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.BindableProperty |
UncheckedColorProperty
Backing store for UnCheckedColor property.
Declaration
public static readonly BindableProperty UncheckedColorProperty
Field Value
Type |
---|
Microsoft.Maui.Controls.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 |
---|
Microsoft.Maui.Graphics.Color |
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 |
---|---|
System.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 |
---|---|
System.Boolean | 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 |
---|
Microsoft.Maui.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 |
---|
Microsoft.Maui.Controls.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 |
---|---|
System.Boolean | 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 |
---|
System.String |
FontSize
Gets or sets the size of the text in this control.
Declaration
public double FontSize { get; set; }
Property Value
Type |
---|
System.Double |
HorizontalTextAlignment
Gets or sets the horizontal alignment of the text in this content.
Declaration
public TextAlignment HorizontalTextAlignment { get; set; }
Property Value
Type |
---|
Microsoft.Maui.TextAlignment |
IsEnabled
Gets or sets the value of IsEnabled.
Declaration
public bool IsEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
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 |
---|
System.Double |
Text
Gets or sets the Text.
Declaration
public string Text { get; set; }
Property Value
Type |
---|
System.String |
TextColor
Gets or sets the color of the text in this control.
Declaration
public Color TextColor { get; set; }
Property Value
Type |
---|
Microsoft.Maui.Graphics.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 |
---|
Microsoft.Maui.Graphics.Color |
Events
StateChanged
Event handles when value of the IsChecked property changed.
Declaration
public event EventHandler<StateChangedEventArgs> StateChanged
Event Type
Type |
---|
System.EventHandler<StateChangedEventArgs> |
StateChanging
Occurs when the state is changing in SfCheckBox
Declaration
public event EventHandler<StateChangingEventArgs> StateChanging
Event Type
Type |
---|
System.EventHandler<StateChangingEventArgs> |