Class RadToggleButton
Represents a button that can be toggled.
Inherited Members
Namespace: Telerik.Maui.Controls
Assembly: Telerik.Maui.Controls.dll
Syntax
public class RadToggleButton : RadButtonBase, ITextContentButton, IContentButton, INotifyPropertyChanged
Constructors
RadToggleButton()
Fields
ActualContentProperty
Identifies the ActualContent property.
Declaration
public static readonly BindableProperty ActualContentProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ContentProperty
Identifies the Content property.
Declaration
public static readonly BindableProperty ContentProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
ContentTemplateProperty
Identifies the ContentTemplate property.
Declaration
public static readonly BindableProperty ContentTemplateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FontAttributesProperty
Identifies the FontAttributes property.
Declaration
public static readonly BindableProperty FontAttributesProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FontFamilyProperty
Identifies the FontFamily property.
Declaration
public static readonly BindableProperty FontFamilyProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
FontSizeProperty
Identifies the FontSize property.
Declaration
public static readonly BindableProperty FontSizeProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
HorizontalTextAlignmentProperty
Identifies the HorizontalTextAlignment property.
Declaration
public static readonly BindableProperty HorizontalTextAlignmentProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsThreeStateProperty
Identifies the IsThreeState property.
Declaration
public static readonly BindableProperty IsThreeStateProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
IsToggledProperty
Identifies the IsToggled property.
Declaration
public static readonly BindableProperty IsToggledProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
TextColorProperty
Identifies the TextColor property.
Declaration
public static readonly BindableProperty TextColorProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
TextDecorationsProperty
Identifies the TextDecorations property.
Declaration
public static readonly BindableProperty TextDecorationsProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
VerticalTextAlignmentProperty
Identifies the VerticalTextAlignment property.
Declaration
public static readonly BindableProperty VerticalTextAlignmentProperty
Field Value
Microsoft.Maui.Controls.BindableProperty
|
Properties
ActualContent
Gets the actual presented content. If Content is set and ContentTemplate is set, returns a View created from the ContentTemplate.CreateView(), having Content as its BindingContext. If Content is set to a string and no ContentTemplate is set, returns a default Label which Text is set to Content. />. If Content is set to a View and no ContentTemplate is set, returns the View. If Content is set to a data object and no ContentTemplate, returns a default Label which Text is set to the ToString() representation of the data object.
Declaration
public View ActualContent { get; }
Property Value
Microsoft.Maui.Controls.View
|
Content
If Content is set and ContentTemplate is set, the View returned from the ContentTemplate.CreateView() will be displayed inside the ControlTemplate, having Content as its BindingContext. If Content is set to a string and no ContentTemplate is set, it will be converted to Label which Text is set to the Content inside the ControlTemplate. If Content is set to a View and no ContentTemplate is set, the View will be displayed inside the ControlTemplate. If Content is set to a data object and no ContentTemplate is set, the ToString() of the data object will be used and converted to Label inside the ControlTemplate.
Declaration
public object Content { get; set; }
Property Value
System.Object
|
ContentTemplate
If ContentTemplate is set, the View returned from the ContentTemplate.CreateView() will be displayed inside the ControlTemplate, having Content as its BindingContext. If ContentTemplate is DataTemplateSelector, first the DataTemplate will be selected and then a View will be created from the chosen template using Content as its BindingContext.
Declaration
public DataTemplate ContentTemplate { get; set; }
Property Value
Microsoft.Maui.Controls.DataTemplate
|
FontAttributes
Gets or sets the font attributes of the Label created when Content is string and ContentTemplate is not set. For more information see the Microsoft.Maui.Controls.FontAttributes type.
Declaration
public FontAttributes FontAttributes { get; set; }
Property Value
Microsoft.Maui.Controls.FontAttributes
|
FontFamily
Gets or sets the font family of the Label created when Content is string and ContentTemplate is not set.
Declaration
public string FontFamily { get; set; }
Property Value
System.String
|
FontSize
Gets or sets the font size in pixels of the Label created when Content is string and ContentTemplate is not set.
Declaration
public double FontSize { get; set; }
Property Value
System.Double
|
HorizontalTextAlignment
Gets or sets the horizontal alignment of the Label created when Content is string and ContentTemplate is not set. For more information see the Microsoft.Maui.TextAlignment type.
Declaration
public TextAlignment HorizontalTextAlignment { get; set; }
Property Value
Microsoft.Maui.TextAlignment
|
IsThreeState
Gets or sets a boolean value indicating whether the IsToggled can be set to null. The default value is false.
Declaration
public bool IsThreeState { get; set; }
Property Value
System.Boolean
|
IsToggled
Gets or sets a value indicating whether the button is toggled or untoggled. If IsThreeState is set to true, this value also indicates if the button is in null/indeterminate state.
Declaration
public Nullable<bool> IsToggled { get; set; }
Property Value
System.Nullable<System.Boolean>
|
TextColor
Gets or sets the text color of the Label created when Content is string and ContentTemplate is not set.
Declaration
public Color TextColor { get; set; }
Property Value
Microsoft.Maui.Graphics.Color
|
TextDecorations
Gets or sets the text decorations of the Label created when Content is string and ContentTemplate is not set. For more information see the Microsoft.Maui.TextDecorations type.
Declaration
public TextDecorations TextDecorations { get; set; }
Property Value
Microsoft.Maui.TextDecorations
|
VerticalTextAlignment
Gets or sets the vertical alignment of the Label created when Content is string and ContentTemplate is not set. For more information see the Microsoft.Maui.TextAlignment type.
Declaration
public TextAlignment VerticalTextAlignment { get; set; }
Property Value
Microsoft.Maui.TextAlignment
|
Methods
ChangeVisualState()
Events
IsToggledChanged
Raised when the IsToggled property has changed.
Declaration
public event EventHandler<ValueChangedEventArgs<Nullable<bool>>> IsToggledChanged
Event Type
System.EventHandler<ValueChangedEventArgs<System.Nullable<System.Boolean>>>
|