# DialogButtonViewModel.CreateApply method

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.

```csharp
public static IDialogButtonViewModel CreateApply(ICommand command, object? commandParameter = null)
```

| parameter | description |
| --- | --- |
| command | The command invoked when the button is pressed. |
| commandParameter | The value passed to *command*. |

## Return Value

The button view model.

## See Also

* class [DialogButtonViewModel](../DialogButtonViewModel.md)
* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](../index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.ApplicationServices.dll -->
