[]
Represents a switch that can be toggled between two states.
[TemplatePart(Name = "ToggleContainer", Type = typeof(FrameworkElement))]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "MouseOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Focused", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "On", GroupName = "ToggleStates")]
[TemplateVisualState(Name = "Off", GroupName = "ToggleStates")]
public class C1ToggleSwitch : C1View
| Name | Description |
|---|---|
| C1ToggleSwitch() | Initializes a new instance of the C1ToggleSwitch class. |
| Name | Description |
|---|---|
| AccentBrushProperty | Identifies the AccentBrush dependency property. |
| AccentForegroundProperty | Identifies the AccentForeground dependency property. |
| IsOnProperty | Identifies the IsOn dependency property. |
| OffContentProperty | Identifies the OffContent dependency property. |
| OnContentProperty | Identifies the OnContent dependency property. |
| Name | Description |
|---|---|
| AccentBrush | Accent brush of the ToggleSwitch control. |
| AccentForeground | Accent foreground brush of the ToggleSwitch control. |
| IsFocused | Gets whether the control is focused. |
| IsOn | Gets or sets a value that declares whether the state of the ToggleSwitch is "On". |
| OffContent | Gets or sets the content displayed when the state is Off. |
| OnContent | Gets or sets the content displayed when the state is On. |
| Name | Description |
|---|---|
| ChangeVisualStateCommon(bool) | Updates the current visual state of the Common visual state group to match the object's properties. |
| ChangeVisualStateToggle(bool) | Updates the current visual state of the Toggle visual state group to match the object's properties. |
| Dispose(bool) | |
| OnApplyTemplate() | |
| Toggle() | Inverts the state of the ToggleSwitch control. |
| Name | Description |
|---|---|
| IsOnChanged | Event raised when the IsOn property has changed. |
| Toggled | Fires when the control's state is changed. |