# DialogAwareViewModel class

Base class for view models shown as modal dialogs by IDialogService. On top of [`WindowAwareViewModel`](./WindowAwareViewModel.md) it builds the dialog buttons when the window opens.

```csharp
public abstract class DialogAwareViewModel : WindowAwareViewModel, IDialogAwareViewModel
```

## Public Members

| name | description |
| --- | --- |
| [ButtonsSource](DialogAwareViewModel/ButtonsSource.md) { get; set; } |  |
| [CloseDialogCommand](DialogAwareViewModel/CloseDialogCommand.md) { get; } |  |
| [CloseDialog](DialogAwareViewModel/CloseDialog.md)() | Closes the dialog with Cancel, as if the user had cancelled it. The generated `CloseDialogCommand` property makes this available to bindings. |

## Remarks

Override CreateButtons to define the footer buttons. For the common OK/Cancel pair, derive from [`OkCancelDialogAwareViewModel`](./OkCancelDialogAwareViewModel.md) instead.

## See Also

* class [WindowAwareViewModel](./WindowAwareViewModel.md)
* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](./index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.ApplicationServices.dll -->
