Class GridToggleSwitchColumn
Represents a column that used to display and edit boolean values and hosts ToggleSwitch as its cell content.
Inherited Members
Namespace: Syncfusion.UI.Xaml.DataGrid
Assembly: Syncfusion.Grid.WinUI.dll
Syntax
public class GridToggleSwitchColumn : GridColumn, IDisposable, INotifyDependencyPropertyChanged, IFilterDefinition
Constructors
GridToggleSwitchColumn()
Initializes a new instance of GridToggleSwitchColumn class.
Declaration
public GridToggleSwitchColumn()
Fields
HorizontalAlignmentProperty
Identifies the HorizontalAlignment dependency property.
Declaration
public static readonly DependencyProperty HorizontalAlignmentProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the HorizontalAlignment dependency property.
OffContentProperty
Identifies the OffContent dependency property.
Declaration
public static readonly DependencyProperty OffContentProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the OffContent dependency property.
OnContentProperty
Identifies the OnContent dependency property.
Declaration
public static readonly DependencyProperty OnContentProperty
Field Value
Type |
---|
Microsoft.UI.Xaml.DependencyProperty |
Remarks
The identifier for the OnContent dependency property.
Properties
HorizontalAlignment
Gets or sets the horizontal alignment for the column .
Declaration
public HorizontalAlignment HorizontalAlignment { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.UI.Xaml.HorizontalAlignment | One of the Microsoft.UI.Xaml.HorizontalAlignment enumeration that specifies the horizontal alignment. The default value is HorizontalAlignment.Stretch |
OffContent
Gets or sets the text when the toggle in off state.
Declaration
public object OffContent { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The displayed text when Toggle in off state. The default value is string.Empty. |
OnContent
Gets or sets the text when the toggle in on state.
Declaration
public object OnContent { get; set; }
Property Value
Type | Description |
---|---|
System.Object | The displayed text when Toggle in on state. The default value is string.Empty. |
Methods
CanEndEditColumn()
Checks whether the column is boolean type or not.
Declaration
protected override bool CanEndEditColumn()
Returns
Type | Description |
---|---|
System.Boolean | By default, returns true. |
Overrides
Remarks
override this method in corresponding boolean column and returns true.