0 out of 1 rated this helpful - Rate this topic

ToggleSwitch.OnContent property

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

Syntax

Public Property OnContent As Object
   Get
   Set

<ToggleSwitch OnContent="stringContent"/>


<ToggleSwitch>
  <ToggleSwitch.OnContent>
    singleContentElement
  </ToggleSwitch.OnContent>
</ToggleSwitch>

XAML Values

stringContent

A 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

A single object element for a class that derives from UIElement and can be handled by the default ContentPresenter.

Property value

Type: System.Object [.NET] | Platform::Object [C++]

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.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Namespace

Windows.UI.Xaml.Controls
Windows::UI::Xaml::Controls [C++]

Metadata

Windows.winmd

See also

ToggleSwitch

 

 

Build date: 3/12/2013

© 2013 Microsoft. All rights reserved.