# 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.

```csharp
public class DialogButtonViewModel : ViewModelBase, IDialogButtonViewModel
```

## Public Members

| name | description |
| --- | --- |
| [DialogButtonViewModel](DialogButtonViewModel/DialogButtonViewModel.md)() | Initializes an empty button. Every property has to be assigned afterwards; prefer the `Create*` factory methods for the standard buttons. |
| [DialogButtonViewModel](DialogButtonViewModel/DialogButtonViewModel.md)(…) | Initializes a fully configured button. The `Create*` factory methods call this constructor with the settings of each standard button. |
| [ButtonType](DialogButtonViewModel/ButtonType.md) { get; } |  |
| [Caption](DialogButtonViewModel/Caption.md) { get; set; } |  |
| [Classes](DialogButtonViewModel/Classes.md) { get; set; } |  |
| [Command](DialogButtonViewModel/Command.md) { get; set; } |  |
| [CommandParameter](DialogButtonViewModel/CommandParameter.md) { get; set; } |  |
| [Dock](DialogButtonViewModel/Dock.md) { get; } |  |
| [Index](DialogButtonViewModel/Index.md) { get; } |  |
| [IsCancel](DialogButtonViewModel/IsCancel.md) { get; set; } |  |
| [IsDefault](DialogButtonViewModel/IsDefault.md) { get; set; } |  |
| static [CreateApply](DialogButtonViewModel/CreateApply.md)(…) | 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](DialogButtonViewModel/CreateCancel.md)(…) | Creates the Cancel button, captioned in the current UI language and activated by Escape. |
| static [CreateClose](DialogButtonViewModel/CreateClose.md)(…) | 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](DialogButtonViewModel/CreateCustom.md)(…) | Creates a button with a caption, position and appearance of your own, for actions that are specific to one dialog. |
| static [CreateOk](DialogButtonViewModel/CreateOk.md)(…) | Creates the default OK button, captioned in the current UI language and activated by Enter. (2 methods) |

## See Also

* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](./index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.ApplicationServices.dll -->
