共用方式為


NavigationView.PaneOpened 事件

定義

發生于開啟 NavigationView 窗格時。

適用于 UWP 的對等 WinUI 2 APIMicrosoft.UI.Xaml.Controls.NavigationView.Pane 在Windows 應用程式 SDK中開啟的 WinUI (,請參閱) Windows 應用程式 SDK命名空間

// Register
event_token PaneOpened(TypedEventHandler<NavigationView, IInspectable const&> const& handler) const;

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

// Revoke with event_revoker
NavigationView::PaneOpened_revoker PaneOpened(auto_revoke_t, TypedEventHandler<NavigationView, IInspectable const&> const& handler) const;
public event TypedEventHandler<NavigationView,object> PaneOpened;
function onPaneOpened(eventArgs) { /* Your code */ }
navigationView.addEventListener("paneopened", onPaneOpened);
navigationView.removeEventListener("paneopened", onPaneOpened);
- or -
navigationView.onpaneopened = onPaneOpened;
Public Custom Event PaneOpened As TypedEventHandler(Of NavigationView, Object) 
<NavigationView PaneOpened="eventhandler" />

事件類型

Windows 需求

裝置系列
Windows 10, version 1803 (已於 10.0.17134.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v6.0 引進)

適用於