DesktopWindowXamlSource.TakeFocusRequested イベント

定義

ホスト デスクトップ アプリケーションが DesktopWindowXamlSource オブジェクトからフォーカスを取り戻す要求を受け取ったときに発生します (たとえば、ユーザーは DesktopWindowXamlSource の最後のフォーカス可能な要素に移動し、 Tab キーを押します)。

// Register
event_token TakeFocusRequested(TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs const&> const& handler) const;

// Revoke with event_token
void TakeFocusRequested(event_token const* cookie) const;

// Revoke with event_revoker
DesktopWindowXamlSource::TakeFocusRequested_revoker TakeFocusRequested(auto_revoke_t, TypedEventHandler<DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs const&> const& handler) const;
public event TypedEventHandler<DesktopWindowXamlSource,DesktopWindowXamlSourceTakeFocusRequestedEventArgs> TakeFocusRequested;
function onTakeFocusRequested(eventArgs) { /* Your code */ }
desktopWindowXamlSource.addEventListener("takefocusrequested", onTakeFocusRequested);
desktopWindowXamlSource.removeEventListener("takefocusrequested", onTakeFocusRequested);
- or -
desktopWindowXamlSource.ontakefocusrequested = onTakeFocusRequested;
Public Custom Event TakeFocusRequested As TypedEventHandler(Of DesktopWindowXamlSource, DesktopWindowXamlSourceTakeFocusRequestedEventArgs) 

イベントの種類

注釈

DesktopWindowXamlSource をデスクトップ アプリケーションに追加すると、既定では、DesktopWindowXamlSourceTab キーや方向キーなどのキーボード イベントを介してフォーカス ナビゲーションを自動的に処理しません。 このイベントを処理して、ユーザーが DesktopWindowXamlSource から移動したときに、ホスト アプリケーション内の次のフォーカス可能な要素にプログラムでフォーカスを与えます。

適用対象