ToggleSwitch.OnContentTemplate Property


Gets or sets the DataTemplate used to display the control's content while in "On" state.

DataTemplate OnContentTemplate();

void OnContentTemplate(DataTemplate value);
public DataTemplate OnContentTemplate { get; set; }
var dataTemplate = toggleSwitch.onContentTemplate;
toggleSwitch.onContentTemplate = dataTemplate;
Public Property OnContentTemplate As DataTemplate
- or -
<ToggleSwitch OnContentTemplate="resourceReferenceToDataTemplate"/>

Property Value

The DataTemplate that displays the control's content while in "On" state.

Applies to