語言

HwndHost.OnKeyDown(KeyEventArgs) 方法

定義

當託管視窗收到 WM_KEYDOWN 訊息時,會被呼叫。

protected:
 override void OnKeyDown(System::Windows::Input::KeyEventArgs ^ e);
[System.Security.SecurityCritical]
[System.Security.SecurityTreatAsSafe]
protected override void OnKeyDown(System.Windows.Input.KeyEventArgs e);
protected override void OnKeyDown(System.Windows.Input.KeyEventArgs e);
[<System.Security.SecurityCritical>]
[<System.Security.SecurityTreatAsSafe>]
override this.OnKeyDown : System.Windows.Input.KeyEventArgs -> unit
override this.OnKeyDown : System.Windows.Input.KeyEventArgs -> unit
Protected Overrides Sub OnKeyDown (e As KeyEventArgs)

參數

e
KeyEventArgs

事件資料。

屬性

備註

Important

此類型或成員在網際網路安全區域內無法使用。

這是對類別處理程式 OnKeyDown 的覆寫,提供將 Win32 訊息轉換成 Windows Presentation Foundation(WPF)事件的行為,並在適當時標記該事件為已處理。

適用於