# OkCancelDialogAwareViewModel.CanOk method

Decides whether the OK button is enabled. Override it to require valid input before the dialog can be confirmed.

```csharp
public virtual bool CanOk(object parameter)
```

| parameter | description |
| --- | --- |
| parameter | The command parameter supplied by the button. Unused by the base implementation. |

## Return Value

`true` when OK may be pressed. The base implementation always returns `true`.

## See Also

* class [OkCancelDialogAwareViewModel](../OkCancelDialogAwareViewModel.md)
* namespace [Eremex.AvaloniaUI.Controls.ApplicationServices](../index.md)

<!-- DO NOT EDIT: generated by xmldocmd for Eremex.Avalonia.Controls.ApplicationServices.dll -->
