Bagikan melalui


DesktopWindowXamlSource.TakeFocusRequested Kejadian

Definisi

Terjadi ketika aplikasi desktop host menerima permintaan mengambil kembali fokus dari objek DesktopWindowXamlSource (misalnya, pengguna berada pada elemen terakhir yang dapat difokuskan di DesktopWindowXamlSource dan menekan 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) 

Jenis Acara

Keterangan

Saat Anda menambahkan DesktopWindowXamlSource ke aplikasi desktop Anda, secara default DesktopWindowXamlSource tidak secara otomatis menangani navigasi fokus melalui peristiwa keyboard seperti tombol Tab atau panah. Tangani peristiwa ini untuk secara terprogram memberikan fokus ke elemen yang dapat difokuskan berikutnya dalam aplikasi host ketika pengguna menavigasi jauh dari DesktopWindowXamlSource.

Berlaku untuk