Share via


ProcessKeyboardAcceleratorEventArgs.Handled 屬性

定義

取得或設定值,這個值會將事件標示為已處理。

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

void Handled(bool value);
public bool Handled { get; set; }
var boolean = processKeyboardAcceleratorEventArgs.handled;
processKeyboardAcceleratorEventArgs.handled = boolean;
Public Property Handled As Boolean

屬性值

Boolean

bool

true 表示標記已處理的事件。 false 會讓事件保持未處理。 預設值為 false

備註

鍵盤快速鍵事件會從焦點指向根 Window 元素的專案反升。 如果未處理事件,架構會使用全域加速器的資料表,在反升路徑之外尋找其他加速器。 除非使用 ScopeOwner限定範圍,否則所有加速器都會註冊為全域。

只有在焦點位於特定範圍內時,才會叫用限定範圍的快速鍵。 例如,在包含許多控制項的 Grid 中,快速鍵可以與範圍設定為 Grid 的控制項相關聯, (Grid 是 ScopeOwner) 。 在此情況下,根項目是 Grid。

如果使用相同的按鍵組合來定義兩個快速鍵,則會叫用資料表中找到的第一個快速鍵。

適用於

另請參閱