The standard IDialogButtonViewModel implementation. Use the Create* factory methods for the common buttons — they apply the right caption, style classes and default/cancel behaviour — and return the results from CreateButtons.
Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Avalonia.Controls.ApplicationServices.dll
NuGet Package: Eremex.Avalonia.Controls.ApplicationServices
Declaration
public class DialogButtonViewModel : ViewModelBase, IDialogButtonViewModel
Constructors
| name |
description |
| DialogButtonViewModel() |
Initializes an empty button. Every property has to be assigned afterwards; prefer the Create* factory methods for the standard buttons. |
| DialogButtonViewModel(…) |
Initializes a fully configured button. The Create* factory methods call this constructor with the settings of each standard button. |
Properties
Methods
| name |
description |
| static CreateApply(…) |
Creates the Apply button, captioned in the current UI language. It applies the changes without closing the dialog, so it is neither the default nor the cancel button. |
| static CreateCancel(…) |
Creates the Cancel button, captioned in the current UI language and activated by Escape. |
| static CreateClose(…) |
Creates the Close button, captioned in the current UI language and activated by Escape. Use it instead of Cancel in dialogs that only display information and have nothing to cancel. |
| static CreateCustom(…) |
Creates a button with a caption, position and appearance of your own, for actions that are specific to one dialog. |
| static CreateOk(…) |
Creates the default OK button, captioned in the current UI language and activated by Enter. (2 methods) |
See Also