Table of Contents

Class ConfirmParameters

Namespace
Tudormobile.Wpf.Behaviors
Assembly
Tudormobile.WpfControls.dll

Represents a set of parameters used to configure and display a confirmation dialog.

public class ConfirmParameters : Freezable
Inheritance
ConfirmParameters
Inherited Members

Remarks

This class provides properties for specifying the message, button text, and command behavior for a confirmation dialog. It also includes a property to determine whether the operation was cancelled. The dialog can be used to prompt the user for confirmation before executing an action, with support for data binding and commands.

Properties

ButtonText

Gets or sets the text displayed on the buttons. Up to three button texts can be defined, separated by the '|' character. By default, buttons are labeled "Yes" and "No" ("Yes|No") and displayed right to left. The first letter of each button text is used as the access key (mnemonic) for that button. The first button is considered the "affirmative" action.

public string? ButtonText { get; set; }

Property Value

string

Command

Gets or sets the command to invoke when the user confirms.

public ICommand? Command { get; set; }

Property Value

ICommand

CommandParameter

Gets or sets the parameter to pass to the Command property.

public object? CommandParameter { get; set; }

Property Value

object

Message

Gets or sets the confirmation message displayed to the user when the button is clicked. This message appears in the confirmation dialog and should clearly describe the action requiring user approval. If not set, the button's content or a default prompt is used.

public string? Message { get; set; }

Property Value

string

WasCancelled

Gets or sets a value indicating whether the operation was cancelled. This property can be used to determine if the user chose to 'cancel' rather than just 'not confirm'. It is null if the button has not been clicked yet, true if the user cancelled, and false if the user confirmed.

public bool? WasCancelled { get; set; }

Property Value

bool?

Methods

CreateInstanceCore()

When implemented in a derived class, creates a new instance of the Freezable derived class.

protected override Freezable CreateInstanceCore()

Returns

Freezable

The new instance.