DialogButtonViewModel.CreateOk method (1 of 2)¶
Creates the default OK button, captioned in the current UI language and activated by Enter.
Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Avalonia.Controls.ApplicationServices.dll
NuGet Package: Eremex.Avalonia.Controls.ApplicationServices
Declaration¶
Parameters¶
| name | type | description |
|---|---|---|
| command | ICommand |
The command invoked when the button is pressed. |
| commandParameter | object? |
The value passed to command. |
Returns¶
| type | description |
|---|---|
IDialogButtonViewModel |
The button view model. |
See Also¶
- class DialogButtonViewModel
- namespace Eremex.AvaloniaUI.Controls.ApplicationServices
DialogButtonViewModel.CreateOk method (2 of 2)¶
Creates the default button with a caption of your own, styled like OK and activated by Enter. Use it when the confirming action deserves a more specific name, such as "Save" or "Install".
Namespace: Eremex.AvaloniaUI.Controls.ApplicationServices
Assembly: Eremex.Avalonia.Controls.ApplicationServices.dll
NuGet Package: Eremex.Avalonia.Controls.ApplicationServices
Declaration¶
public static IDialogButtonViewModel CreateOk(ICommand command, string content,
object? commandParameter = null)
Parameters¶
| name | type | description |
|---|---|---|
| command | ICommand |
The command invoked when the button is pressed. |
| content | string |
The button caption. It is used as given, not localized. |
| commandParameter | object? |
The value passed to command. |
Returns¶
| type | description |
|---|---|
IDialogButtonViewModel |
The button view model. |
See Also¶
- class DialogButtonViewModel
- namespace Eremex.AvaloniaUI.Controls.ApplicationServices