feat: implement default button for dialog control.
This commit is contained in:
@@ -12,7 +12,7 @@ public partial class DialogWithActionViewModel: ObservableObject, IDialogContext
|
||||
[ObservableProperty] private string _title;
|
||||
[ObservableProperty] private DateTime _date;
|
||||
public object? DefaultCloseResult { get; set; } = true;
|
||||
public event EventHandler<object>? Closed;
|
||||
public event EventHandler<object?>? Closed;
|
||||
|
||||
public ICommand OKCommand { get; set; }
|
||||
public ICommand CancelCommand { get; set; }
|
||||
|
||||
@@ -4,5 +4,8 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Ursa.Demo.Dialogs.PlainDialog">
|
||||
|
||||
<StackPanel Margin="8">
|
||||
<TextBlock Classes="Strong" Margin="8" Text="{Binding Title}"></TextBlock>
|
||||
<Calendar SelectedDate="{Binding Date}" ></Calendar>
|
||||
</StackPanel>
|
||||
</UserControl>
|
||||
|
||||
Reference in New Issue
Block a user