Share via


ToggleSwitch.OnContentTemplate Property

Definition

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
<ToggleSwitch>
  <ToggleSwitch.OnContentTemplate>
    singleDataTemplate
  </ToggleSwitch.OnContentTemplate>
</ToggleSwitch>
- or -
<ToggleSwitch OnContentTemplate="resourceReferenceToDataTemplate"/>

Property Value

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

Applies to