Class ToggleButton
Represents the ToggleButton class.
Namespace: Syncfusion.XForms.Buttons
Assembly: Syncfusion.Buttons.XForms.dll
Syntax
public abstract class ToggleButton : View
Constructors
ToggleButton()
Declaration
protected ToggleButton()
Fields
BorderWidthProperty
Backing store for BorderWidth property.
Declaration
public static readonly BindableProperty BorderWidthProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
CheckedColorProperty
Backing store for CheckedColor property.
Declaration
public static readonly BindableProperty CheckedColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ControlSizeProperty
Backing store for ControlSize property.
Declaration
public static readonly BindableProperty ControlSizeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
Android is not supported for ControlSize customization.
FontAttributesProperty
Backing store for FontAttributes property.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
FontFamilyProperty
Backing store for FontFamily property.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
FontSizeProperty
Backing store for FontSize property.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
HorizontalTextAlignmentProperty
Backing store for HorizontalTextAlignment property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
IsCheckedProperty
Backing store for the IsChecked property.
Declaration
public static readonly BindableProperty IsCheckedProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
IsThreeStateProperty
Backing store for IsThreeState property.
Declaration
public static readonly BindableProperty IsThreeStateProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
LineBreakModeProperty
Backing store for LineBreakMode property.
Declaration
public static readonly BindableProperty LineBreakModeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
PaddingProperty
Backing store for HorizontalTextAlignment property.
Declaration
public static readonly BindableProperty PaddingProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TextColorProperty
Backing store for TextColor property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TextProperty
Backing store for Text property.
Declaration
public static readonly BindableProperty TextProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
UncheckedColorProperty
Backing store for UnCheckedColor property.
Declaration
public static readonly BindableProperty UncheckedColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
BorderWidth
Gets or sets the value of BorderWidth.
Declaration
public double BorderWidth { get; set; }
Property Value
Type |
---|
System.Double |
CheckedColor
Gets or sets the fill color of the ToggleButton when the IsChecked property is set to true.
Declaration
public Color CheckedColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
ControlSize
Gets or sets the value of ControlSize.
Declaration
public double ControlSize { get; set; }
Property Value
Type |
---|
System.Double |
Remarks
Android is not supported for ControlSize customization.
FontAttributes
Gets or sets the value that indicates whether the font for the ToggleButton text is bold,italic, or neither.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
Type |
---|
Xamarin.Forms.FontAttributes |
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 |
---|
Xamarin.Forms.TextAlignment |
IsChecked
Gets or sets whether the ToggleButton is checked.
Declaration
public virtual Nullable<bool> IsChecked { get; set; }
Property Value
Type |
---|
System.Nullable<System.Boolean> |
IsThreeState
Gets or sets a value indicating whether the control supports three states.
Declaration
public bool IsThreeState { get; set; }
Property Value
Type |
---|
System.Boolean |
LineBreakMode
Gets or sets the value that indicates LineBreakMode for the text.
Declaration
public LineBreakMode LineBreakMode { get; set; }
Property Value
Type |
---|
LineBreakMode |
Padding
Gets or sets the padding of the Toggle button.
Declaration
public Thickness Padding { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Thickness |
Text
Gets or sets the text associated with this control.
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 |
---|
Xamarin.Forms.Color |
UncheckedColor
Gets or sets the stroke color of the ToggleButton when the IsChecked property is set to false.
Declaration
public Color UncheckedColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
Methods
OnMeasure(Double, Double)
Method is called when a layout measurement happens.
Declaration
protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | Width constraint. |
System.Double | heightConstraint | Height constraint. |
Returns
Type | Description |
---|---|
Xamarin.Forms.SizeRequest | The size request. |
Events
StateChanged
Event handles when value of the IsChecked property changed.
Declaration
public event EventHandler<StateChangedEventArgs> StateChanged
Event Type
Type |
---|
System.EventHandler<StateChangedEventArgs> |