ToggleSwitch.IsOn 屬性

定義

取得或設定值,這個值會宣告 ToggleSwitch 的狀態是否為 “On”。

public:
 property bool IsOn { bool get(); void set(bool value); };
bool IsOn();

void IsOn(bool value);
public bool IsOn { get; set; }
var boolean = toggleSwitch.isOn;
toggleSwitch.isOn = boolean;
Public Property IsOn As Boolean
<ToggleSwitch IsOn="bool" />

屬性值

Boolean

bool

如果狀態為 「On」,則為 true;如果狀態為 「Off」,則為 false。

備註

“On” 狀態會使用 OnContentTemplate 中的範本。 “Off” 狀態會使用 OffContentTemplate 中的範本。

適用於