DialogButtonViewModel class¶
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.
Public Members¶
| 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. |
| ButtonType { get; } | |
| Caption { get; set; } | |
| Classes { get; set; } | |
| Command { get; set; } | |
| CommandParameter { get; set; } | |
| Dock { get; } | |
| Index { get; } | |
| IsCancel { get; set; } | |
| IsDefault { get; set; } | |
| 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) |