41 lines
2.1 KiB
XML
41 lines
2.1 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:u="https://irihi.tech/ursa"
|
|
xmlns:viewModels="clr-namespace:Ursa.Demo.ViewModels"
|
|
mc:Ignorable="d" d:DesignWidth="800"
|
|
d:DesignHeight="450"
|
|
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}" >
|
|
<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="Non-button control as main element" Margin="0 16" />
|
|
<u:PopConfirm PopupHeader="Header" PopupContent="Content"
|
|
TriggerMode="Click"
|
|
Placement="BottomEdgeAlignedLeft"
|
|
ConfirmCommand="{Binding ConfirmCommand}"
|
|
CancelCommand="{Binding Path=CancelCommand}" >
|
|
<TextBlock Text="Hello World" />
|
|
</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>
|
|
</UserControl>
|