TreeViewItem.IsSelectionActive 屬性

定義

取得指出包含的 TreeView 是否有鍵盤焦點的值。

public:
 property bool IsSelectionActive { bool get(); };
[System.ComponentModel.Browsable(false)]
public bool IsSelectionActive { get; }
[<System.ComponentModel.Browsable(false)>]
member this.IsSelectionActive : bool
Public ReadOnly Property IsSelectionActive As Boolean

屬性值

true 如果 包含 TreeView 具有鍵盤焦點,則為 ,否則為 false 。 預設為 false

屬性

範例

下列範例示範如何取得 屬性的值 IsSelectionActive

bool isEmployee1Active = Employee1Data.IsSelectionActive;
Dim isEmployee1Active As Boolean = Employee1Data.IsSelectionActive

備註

如果鍵盤將焦點從 TreeView 變更為 MenuToolBar ,則這個屬性的值會維持不變 true

相依性屬性資訊

識別碼欄位 IsSelectionActiveProperty
中繼資料屬性設定為 true Inherits

適用於