ToggleSwitch.OffContent property

Applies to Windows and Windows Phone

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

Syntax


public:
property Object^ OffContent { 
   Object^ get();
   void set (Object^ value);
}


<ToggleSwitch OffContent="stringContent"/>


<ToggleSwitch>
  <ToggleSwitch.OffContent>
    singleContentElement
  </ToggleSwitch.OffContent>
</ToggleSwitch>

XAML Values

stringContent

A string that declares the "Off "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

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

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

Metadata

Windows.winmd

See also

ToggleSwitch

 

 

Show:
© 2014 Microsoft