共用方式為


ContentDialog.CloseButtonClick 事件

定義

發生于點選關閉按鈕之後。

// Register
event_token CloseButtonClick(TypedEventHandler<ContentDialog, ContentDialogButtonClickEventArgs const&> const& handler) const;

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

// Revoke with event_revoker
ContentDialog::CloseButtonClick_revoker CloseButtonClick(auto_revoke_t, TypedEventHandler<ContentDialog, ContentDialogButtonClickEventArgs const&> const& handler) const;
public event TypedEventHandler<ContentDialog,ContentDialogButtonClickEventArgs> CloseButtonClick;
function onCloseButtonClick(eventArgs) { /* Your code */ }
contentDialog.addEventListener("closebuttonclick", onCloseButtonClick);
contentDialog.removeEventListener("closebuttonclick", onCloseButtonClick);
- or -
contentDialog.onclosebuttonclick = onCloseButtonClick;
Public Custom Event CloseButtonClick As TypedEventHandler(Of ContentDialog, ContentDialogButtonClickEventArgs) 
<ContentDialog CloseButtonClick="eventhandler"/>

事件類型

Windows 需求

裝置系列
Windows 10 Creators Update (已於 10.0.15063.0 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v4.0 引進)

適用於