HwndHost.OnKeyDown(KeyEventArgs) HwndHost.OnKeyDown(KeyEventArgs) HwndHost.OnKeyDown(KeyEventArgs) HwndHost.OnKeyDown(KeyEventArgs) Method

定義

裝載的視窗收到 WM_KEYDOWN 訊息時呼叫。Called when the hosted window receives a WM_KEYDOWN message.

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

參數

e
KeyEventArgs KeyEventArgs KeyEventArgs KeyEventArgs

事件資料。The event data.

備註

重要

這個類型或成員不可以使用網際網路安全性區域中。This type or member is not available in the Internet security zone.

這會覆寫類別處理常式OnKeyDown,並提供的轉譯行為Win32Win32訊息到Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF)事件,將事件標示為已處理在情況允許時。This is an override of the class handler OnKeyDown and provides the behavior of translating the Win32Win32 message into a Windows Presentation Foundation (WPF)Windows Presentation Foundation (WPF) event, marking the event as handled whenever appropriate.

適用於