feat: enhance PopConfirm with async command support and improve binding. add more demo.

This commit is contained in:
Dong Bin
2025-04-18 17:54:16 +08:00
parent 2a081c0f95
commit 67025dca9c
4 changed files with 52 additions and 20 deletions

View File

@@ -9,9 +9,23 @@
x:DataType="viewModels:PopConfirmDemoViewModel"
x:Class="Ursa.Demo.Pages.PopConfirmDemo">
<StackPanel HorizontalAlignment="Left">
<TextBlock Text="Default PopConfirm" Margin="0 16" />
<u:PopConfirm PopupHeader="Header" PopupContent="Content"
ConfirmCommand="{Binding ConfirmCommand}"
CancelCommand="{Binding Path=CancelCommand}" >
ConfirmCommand="{Binding ConfirmCommand}"
CancelCommand="{Binding Path=CancelCommand}" >
<Button Content="Hello World"></Button>
</u:PopConfirm>
<TextBlock Text="Hover to trigger" Margin="0 16" />
<u:PopConfirm PopupHeader="Header" PopupContent="Content"
TriggerMode="Focus"
ConfirmCommand="{Binding ConfirmCommand}"
CancelCommand="{Binding Path=CancelCommand}" >
<Button Content="Hello World"></Button>
</u:PopConfirm>
<TextBlock Text="Asynchronized command support" Margin="0 16" />
<u:PopConfirm PopupHeader="Header" PopupContent="Content"
ConfirmCommand="{Binding AsyncConfirmCommand}"
CancelCommand="{Binding Path=AsyncCancelCommand}" >
<Button Content="Hello World"></Button>
</u:PopConfirm>
</StackPanel>