-
Notifications
You must be signed in to change notification settings - Fork 7
/
ToolControl.xaml
94 lines (80 loc) · 6.87 KB
/
ToolControl.xaml
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<UserControl
x:Class="修图.Control.ToolControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:修图.Control"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="1200"
d:DesignWidth="77">
<ListView x:Name="ListView" ScrollViewer.VerticalScrollBarVisibility="Hidden" SelectedIndex="0" ItemContainerStyle="{StaticResource ToolListViewItem}" SelectionChanged="ListView_SelectionChanged">
<!--手掌-->
<Border x:Uid="/Tool/Hand" Background="Transparent">
<ContentControl Content="🖐" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--光标-->
<Border x:Uid="/Tool/Cursor" Background="Transparent">
<Viewbox Width="22" Height="22" >
<Path Fill="{StaticResource BlueGradientBrush}" Data="M80.799,68.569l303.201,647.439l82.643,-260.008l269.107,-72l-654.951,-315.431"/>
</Viewbox>
</Border>
<Border x:Uid="/Tool/Straw" Background="Transparent">
<Viewbox Width="22" Height="22" >
<Path Fill="{Binding SignForeground,Mode=OneWay}" Data="M93.102,658.641l14.891,27.237c0,0 132.75,-60.238 134.683,-60.204l250.204,-250.06l49.094,50.262l54.293,-54.197c0.926,-1.44 1.854,-2.885 2.63,-4.41c1.933,-3.796 4.013,-7.544 5.492,-11.538c4.182,-11.29 6.901,-22.333 5.185,-34.322c-1.495,-10.444 -6.258,-20.777 -11.937,-29.511c-2.702,-4.156 -5.909,-7.97 -9.099,-11.765l81.878,-81.665c2.422,-4.146 4.851,-8.304 6.906,-12.644c4.492,-9.486 8.634,-21.274 10.345,-31.553c4.412,-26.513 -1.375,-52.342 -20.436,-71.937c-18.744,-19.269 -48.463,-35.094 -76.224,-30.954c-13.195,1.968 -19.638,3.719 -31.306,9.6c-3.712,1.872 -7.242,4.113 -10.638,6.511c-3.179,2.244 -6.115,4.818 -9.041,7.383l-78.678,78.232c-1.043,-1.121 -2.094,-2.25 -3.286,-3.211c-3.101,-2.496 -6.128,-5.147 -9.572,-7.143c-11.531,-6.684 -23.006,-10.607 -36.271,-11.16c-10.486,-0.436 -20.373,2.884 -29.776,7.249c-3.24,1.504 -6.233,3.495 -9.273,5.369c-1.201,0.74 -2.323,1.605 -3.44,2.467l-55.532,54.128l49.606,49.706l-248.911,249.401c0.163,1.656 -59.429,144.562 -59.429,144.562l25.968,7.139l69.623,-120.959l245.543,-248.891l52.7,53.513l-251.454,255.522 "/>
</Viewbox>
</Border>
<Border x:Uid="/Tool/Magic" Background="Transparent" >
<ContentControl Content="🌠" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--选区-->
<Border x:Uid="/Tool/Rectangle" Background="Transparent" BorderThickness="0,1,0,0" BorderBrush="{Binding LineColor,Mode=OneWay}">
<Rectangle Width="22" Height="18" StrokeThickness="2" Stroke="{Binding SignForeground,Mode=OneWay}" StrokeDashArray="3 1" />
</Border>
<Border x:Uid="/Tool/Ellipse" Background="Transparent">
<Ellipse Width="22" Height="16" StrokeThickness="2" Stroke="{Binding SignForeground,Mode=OneWay}" StrokeDashArray="3 1" />
</Border>
<Border x:Uid="/Tool/Polygon" Background="Transparent">
<Viewbox Width="22" Height="22" >
<Path StrokeThickness="100" Stroke="{Binding SignForeground,Mode=OneWay}" Data="M872.992,1051.37l1.976,-24.364l99.433,-215.989l-75.727,-183.722l-46.095,109.311l121.822,74.411l96.8,-75.728l-55.314,-113.92l-116.555,80.337l-547.763,108.048l-262.372,-592.138l642.358,204.753l364.944,-326.164l-36.012,470.726l-34.821,74.577 "/>
</Viewbox>
</Border>
<Border x:Uid="/Tool/Lasso" Background="Transparent">
<Viewbox Width="22" Height="22" >
<Path StrokeThickness="100" Stroke="{Binding SignForeground,Mode=OneWay}" Data="M872.992,1051.37l1.976,-24.364l99.433,-215.989l-75.727,-183.722l-46.095,109.311l121.822,74.411l96.8,-75.728l-55.314,-113.92l-116.555,80.337c0,0 -135.566,79.798 -332.403,73.752c-229.488,-7.049 -482.06,-116.229 -499.621,-283.487c-0.355,-3.378 -0.691,-6.777 -0.775,-10.205c-2.182,-89.557 21.506,-362.029 500.396,-360.653c447.549,1.286 501.002,274.931 489.621,360.489c-12.149,91.327 -157.218,220.104 -157.218,220.104 "/>
</Viewbox>
</Border>
<!--选区画笔-->
<Border x:Uid="/Tool/MaskPaint" Background="Transparent" BorderThickness="0,1,0,0" BorderBrush="{Binding LineColor,Mode=OneWay}">
<Canvas Width="40" Height="40">
<Ellipse Canvas.Left="4" Canvas.Top="17" Width="19" Height="14" StrokeThickness="1" Stroke="{Binding SignForeground,Mode=OneWay}" StrokeDashArray="5 3" />
<TextBlock Canvas.Left="11" Canvas.Top="5" Text="🖌" FontSize="18"/>
</Canvas>
</Border>
<Border x:Uid="/Tool/MaskEraser" Background="Transparent">
<Canvas Width="40" Height="40">
<Ellipse Canvas.Left="4" Canvas.Top="17" Width="19" Height="14" StrokeThickness="1" Stroke="{Binding SignForeground,Mode=OneWay}" StrokeDashArray="5 3" />
<ContentControl Canvas.Left="14" Canvas.Top="3" Content="" FontSize="22" FontFamily="Segoe MDL2 Assets" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Canvas>
</Border>
<Border x:Uid="/Tool/Smudge" Background="Transparent">
<ContentControl Content="👇" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border x:Uid="/Tool/Mixer" Background="Transparent">
<ContentControl Content="🖍" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<!--画笔-->
<Border x:Uid="/Tool/Paint" Background="Transparent" BorderThickness="0,1,0,0" BorderBrush="{Binding LineColor,Mode=OneWay}">
<ContentControl Content="🖌" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border x:Uid="/Tool/Pencil" Background="Transparent">
<ContentControl Content="✏" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border x:Uid="/Tool/Pen" Background="Transparent">
<ContentControl Content="✒" FontSize="22" FontFamily="微软雅黑" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
<Border x:Uid="/Tool/Eraser" Background="Transparent" >
<ContentControl Content="" FontSize="22" FontFamily="Segoe MDL2 Assets" VerticalAlignment="Center" HorizontalAlignment="Center"/>
</Border>
</ListView>
</UserControl>