DialogControl 增加 ShowCustom 方法
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
<StackPanel>
|
||||
<ToggleSwitch Content="Window/Overlay" OffContent="Overlay" OnContent="Window" IsChecked="{Binding IsWindow}" Name="overlay2" />
|
||||
<ToggleSwitch Content="Global/Local" IsVisible="{Binding !#overlay2.IsChecked}" OffContent="Local" OnContent="Global" IsChecked="{Binding IsGlobal}" />
|
||||
<ToggleSwitch Content="Modal/Regular" IsVisible="{Binding !#overlay2.IsChecked}" OffContent="Regular" OnContent="Modal" IsChecked="{Binding IsModal}" />
|
||||
<ToggleSwitch Content="Modal/Regular" OffContent="Regular" OnContent="Modal" IsChecked="{Binding IsModal}" />
|
||||
<Button Content="Show Dialog" Command="{Binding ShowCustomDialogCommand}" />
|
||||
<TextBlock>
|
||||
<Run Text="Custom Result: "></Run>
|
||||
|
||||
@@ -128,10 +128,19 @@ public class DialogDemoViewModel: ObservableObject
|
||||
var vm = new DialogWithActionViewModel();
|
||||
if (IsWindow)
|
||||
{
|
||||
|
||||
if (IsModal)
|
||||
{
|
||||
Result = await Dialog.ShowCustomModalAsync<DialogWithAction, DialogWithActionViewModel, bool>(
|
||||
vm);
|
||||
Date = vm.Date;
|
||||
}
|
||||
else
|
||||
{
|
||||
Dialog.ShowCustom<DialogWithAction, DialogWithActionViewModel>(
|
||||
vm);
|
||||
}
|
||||
|
||||
Result = await Dialog.ShowCustomModalAsync<DialogWithAction, DialogWithActionViewModel, bool>(
|
||||
vm);
|
||||
Date = vm.Date;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user