ContentDialog.PrimaryButtonClick Event

Definition

Occurs after the primary button has been tapped.

Equivalent WinUI event: Microsoft.UI.Xaml.Controls.ContentDialog.PrimaryButtonClick.

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

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

// Revoke with event_revoker
PrimaryButtonClick_revoker PrimaryButtonClick(auto_revoke_t, TypedEventHandler<ContentDialog, ContentDialogButtonClickEventArgs const &> const& handler) const;
public event TypedEventHandler<ContentDialog,ContentDialogButtonClickEventArgs> PrimaryButtonClick;
function onPrimaryButtonClick(eventArgs) { /* Your code */ }
contentDialog.addEventListener("primarybuttonclick", onPrimaryButtonClick);
contentDialog.removeEventListener("primarybuttonclick", onPrimaryButtonClick);
- or -
contentDialog.onprimarybuttonclick = onPrimaryButtonClick;
Public Custom Event PrimaryButtonClick As TypedEventHandler(Of ContentDialog, ContentDialogButtonClickEventArgs) 
<ContentDialog PrimaryButtonClick="eventhandler"/>

Event Type

TypedEventHandler<ContentDialog,ContentDialogButtonClickEventArgs>

Applies to