|
| 1 | +<UserControl xmlns="https://github.com/avaloniaui" |
| 2 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 3 | + xmlns:hc="https://handyorg.github.io/handycontrol" |
| 4 | + xmlns:vm="clr-namespace:HandyControlDemo.ViewModel" |
| 5 | + xmlns:sys="clr-namespace:System;assembly=System.Runtime" |
| 6 | + x:Class="HandyControlDemo.UserControl.DialogDemo" |
| 7 | + DataContext="{Binding DialogDemo, Source={x:Static vm:ViewModelLocator.Instance}}" |
| 8 | + Background="{DynamicResource RegionBrush}" |
| 9 | + MinWidth="500"> |
| 10 | + <hc:DialogContainer> |
| 11 | + <TransitioningContentControl> |
| 12 | + <Panel> |
| 13 | + <StackPanel Margin="32" |
| 14 | + VerticalAlignment="Center"> |
| 15 | + <Button Content="TextDialog" |
| 16 | + Command="{Binding ShowTextCommand}" /> |
| 17 | + <Button Margin="0,32,0,0" |
| 18 | + Content="TextDialog(In control)" |
| 19 | + Command="{Binding ShowTextCommand}" |
| 20 | + CommandParameter="{Binding $parent[UserControl]}" /> |
| 21 | + <Button Margin="0,32,0,0" |
| 22 | + Content="TextDialog with timer" |
| 23 | + Command="{Binding ShowInteractiveDialogCommand}"> |
| 24 | + <Button.CommandParameter> |
| 25 | + <sys:Boolean>True</sys:Boolean> |
| 26 | + </Button.CommandParameter> |
| 27 | + </Button> |
| 28 | + <TextBox Margin="0,32,0,0" |
| 29 | + Text="{Binding DialogResult}" |
| 30 | + Theme="{StaticResource TextBoxExtend}" |
| 31 | + Watermark="Please input..." /> |
| 32 | + <Button Margin="0,10,0,0" |
| 33 | + Content="InteractiveDialog" |
| 34 | + Command="{Binding ShowInteractiveDialogCommand}"> |
| 35 | + <Button.CommandParameter> |
| 36 | + <sys:Boolean>False</sys:Boolean> |
| 37 | + </Button.CommandParameter> |
| 38 | + </Button> |
| 39 | + <Button Margin="0,32,0,0" |
| 40 | + Content="New window" |
| 41 | + Command="{Binding NewWindowCommand}" /> |
| 42 | + </StackPanel> |
| 43 | + </Panel> |
| 44 | + </TransitioningContentControl> |
| 45 | + </hc:DialogContainer> |
| 46 | +</UserControl> |
0 commit comments