-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathDragDialogDemo.xaml
More file actions
47 lines (47 loc) · 2.59 KB
/
DragDialogDemo.xaml
File metadata and controls
47 lines (47 loc) · 2.59 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<Border x:Class="HandyControlDemo.UserControl.DragDialogDemo"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:hc="https://handyorg.github.io/handycontrol"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
x:Name="DraggableRoot"
mc:Ignorable="d"
Height="220" Width="360">
<Grid>
<Border CornerRadius="8" Background="{DynamicResource DefaultBrush}">
<DockPanel Margin="20,10,20,0">
<Border DockPanel.Dock="Top">
<DockPanel>
<DockPanel>
<Path Stretch="UniformToFill" Fill="{DynamicResource PrimaryTextBrush}"
Data="{DynamicResource InfoGeometry}"
Width="20" Height="20"></Path>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.Dialog}}" FontSize="{DynamicResource SubHeadFontSize}" FontWeight="Bold"
Margin="5,10"/>
<Rectangle Margin="5,5,20,5"
Style="{DynamicResource RectangleFocusVisual}"
Stroke="{DynamicResource PrimaryBrush}"
Fill="{DynamicResource BorderBrush}" StrokeDashArray="4 4" StrokeThickness="1"
hc:DragAdornerElement.IsDraggable="True"
hc:DragAdornerElement.DragTarget="{Binding ElementName=DraggableRoot}"></Rectangle>
</DockPanel>
</DockPanel>
</Border>
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}"
FontSize="{DynamicResource TextFontSize}"
Foreground="{DynamicResource SecondaryTextBrush}"
TextWrapping="Wrap"
Margin="20"/>
</DockPanel>
</Border>
<Button Width="30" Height="30" BorderThickness="0"
Style="{DynamicResource ButtonIconCircular}"
HorizontalAlignment="Right" VerticalAlignment="Top"
Command="{x:Static hc:ControlCommands.Close}"
Margin="0,12,10,0"
hc:IconElement.Geometry="{DynamicResource CloseGeometry}"
Padding="8"></Button>
</Grid>
</Border>