語言

ToggleSwitch.IsOn 屬性

定義

取得或設定一個值,宣告 ToggleSwitch 的狀態是否為「開啟」。

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」則為真;若狀態為「關閉」則為假。

備註

「On」狀態使用 了 OnContentTemplate 的範本。 「關閉」狀態使用 OffContentTemplate 的範本。

適用於