PopConfirm

April 9, 2026 · View on GitHub

Wraps any trigger control and shows a small popup with a header, body, and Confirm / Cancel buttons before executing a command. Supports Click and/or Focus trigger modes.

Basic usage

<PopConfirm PopupHeader="Delete item"
            PopupContent="This action cannot be undone."
            ConfirmCommand="{Binding DeleteCommand}">
    <Button Content="Delete" Theme="{DynamicResource DangerButtonTheme}" />
</PopConfirm>

Properties

PropertyTypeDefaultDescription
PopupHeaderobject?Header content shown inside the popup
PopupHeaderTemplateIDataTemplate?Data template for PopupHeader
PopupContentobject?Body content shown inside the popup
PopupContentTemplateIDataTemplate?Data template for PopupContent
ConfirmCommandICommand?Command executed when the user confirms
CancelCommandICommand?Command executed when the user cancels
ConfirmCommandParameterobject?Parameter passed to ConfirmCommand
CancelCommandParameterobject?Parameter passed to CancelCommand
TriggerModePopConfirmTriggerModeClickWhich interaction opens the popup
IsDropdownOpenboolfalseWhether the popup is currently open
PlacementPlacementModeBottomEdgeAlignedLeftPopup placement relative to the wrapped content
Iconobject?Custom icon in the popup header area (defaults to a warning icon)
HandleAsyncCommandbooltrueWhen true, waits for async commands to complete before closing

PopConfirmTriggerMode values

ValueDescription
ClickOpens on pointer press / button click
FocusOpens when the wrapped control receives focus
Click | FocusOpens on either interaction

With cancel callback

<PopConfirm PopupHeader="Discard changes?"
            PopupContent="Your unsaved changes will be lost."
            ConfirmCommand="{Binding DiscardCommand}"
            CancelCommand="{Binding KeepEditingCommand}">
    <Button Content="Discard" />
</PopConfirm>

Custom icon

<PopConfirm PopupHeader="Send message"
            PopupContent="Are you sure you want to send this?">
    <PopConfirm.Icon>
        <PathIcon Data="{DynamicResource SendRegular}" Width="16" Height="16" />
    </PopConfirm.Icon>
    <Button Content="Send" Theme="{DynamicResource AccentButtonTheme}" />
</PopConfirm>

Focus trigger (e.g. form field confirmation)

<PopConfirm PopupHeader="Confirm email"
            PopupContent="Send a verification link to this address?"
            TriggerMode="Focus"
            ConfirmCommand="{Binding SendVerificationCommand}">
    <TextBox Text="{Binding Email}" PlaceholderText="Email address" />
</PopConfirm>

Programmatic control

popConfirm.IsDropdownOpen = true;  // open
popConfirm.IsDropdownOpen = false; // close