Windows.UI.Xaml.Controls.ToggleSwitch.OnContent

June 22, 2022 ยท View on GitHub

-description

Provides the object content that should be displayed using the OnContentTemplate when this ToggleSwitch has state of "On".

-xaml-syntax

<ToggleSwitch OnContent="stringContent"/>
- or -
<ToggleSwitch>
  <ToggleSwitch.OnContent>
    singleContentElement
  </ToggleSwitch.OnContent>
</ToggleSwitch>

-xaml-values

stringContent
stringContentA string that declares the On state content. Can also be a reference to a resource, which might be a string or could also be a composited object.
singleContentElement
singleContentElementA single object element for a class that derives from UIElement and can be handled by the default ContentPresenter.
## -property-value The object content. In some cases this is a string, in other cases it is a single element that provides a root for further composition content. Probably the most common "set" usage is to place a binding here.

-remarks

-examples

-see-also