-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathDialogDemo.xaml
More file actions
32 lines (32 loc) · 2.45 KB
/
DialogDemo.xaml
File metadata and controls
32 lines (32 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<UserControl x:Class="HandyControlDemo.UserControl.DialogDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:data="clr-namespace:HandyControlDemo.Data"
xmlns:system="clr-namespace:System;assembly=mscorlib"
hc:Dialog.Token="{x:Static data:MessageToken.DialogContainer}"
Background="{DynamicResource RegionBrush}"
MinWidth="500"
DataContext="{Binding DialogDemo,Source={StaticResource Locator}}">
<hc:DialogContainer>
<hc:TransitioningContentControl>
<hc:SimplePanel>
<StackPanel Margin="32" VerticalAlignment="Center">
<Button Content="{ex:Lang Key={x:Static langs:LangKeys.TextDialog}}" Command="{Binding ShowTextCmd}" />
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.TextDialogInControl}}" Command="{Binding ShowTextCmd}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor,AncestorType=UserControl}}"/>
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.TextDialogWithTimer}}" Command="{Binding ShowInteractiveDialogCmd}">
<Button.CommandParameter>
<system:Boolean>True</system:Boolean>
</Button.CommandParameter>
</Button>
<TextBox Margin="0,32,0,0" Text="{Binding DialogResult,UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource TextBoxExtend}" hc:InfoElement.Placeholder="{ex:Lang Key={x:Static langs:LangKeys.PleaseInput}}"/>
<Button Margin="0,10,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.InteractiveDialog}}" Command="{Binding ShowInteractiveDialogCmd}"/>
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.NewWindow}}" Command="{Binding NewWindowCmd}"/>
<Button Margin="0,32,0,0" Content="{ex:Lang Key={x:Static langs:LangKeys.DragDialog}}" Command="{Binding DragDialogCmd}"/>
</StackPanel>
</hc:SimplePanel>
</hc:TransitioningContentControl>
</hc:DialogContainer>
</UserControl>