SwitchPresenter Class

Definition

The SwitchPresenter is a Windows.UI.Xaml.Controls.ContentPresenter which can allow a developer to mimic a switch statement within XAML. When provided a set of Cases and a Value, it will pick the matching Case with the corresponding Value.

[Windows.UI.Xaml.Markup.ContentProperty(Name="SwitchCases")]
public sealed class SwitchPresenter : Windows.UI.Xaml.Controls.ContentPresenter
[<Windows.UI.Xaml.Markup.ContentProperty(Name="SwitchCases")>]
type SwitchPresenter = class
    inherit ContentPresenter
Public NotInheritable Class SwitchPresenter
Inherits ContentPresenter
Inheritance
Windows.UI.Xaml.Controls.ContentPresenter
SwitchPresenter
Attributes
Windows.UI.Xaml.Markup.ContentPropertyAttribute

Constructors

SwitchPresenter()

Initializes a new instance of the SwitchPresenter class.

Fields

CurrentCaseProperty

Identifies the CurrentCase property.

SwitchCasesProperty

Identifies the SwitchCases property.

TargetTypeProperty

Identifies the TargetType property.

ValueProperty

Identifies the Value property.

Properties

CurrentCase

Gets the current Case which is being displayed.

SwitchCases

Gets or sets a value representing the collection of cases to evaluate.

TargetType

Gets or sets a value indicating which type to first cast and compare provided values against.

Value

Gets or sets a value indicating the value to compare all cases against. When this value is bound to and changes, the presenter will automatically evaluate cases and select the new appropriate content from the switch.

Applies to