|
@@ -28,63 +28,12 @@
|
|
|
</Setter>
|
|
|
</Style>
|
|
|
|
|
|
- <DataTemplate x:Key="listboxData">
|
|
|
- <Ellipse Height="20" Width="20" Fill="{Binding}"/>
|
|
|
- </DataTemplate>
|
|
|
-
|
|
|
- <ContextMenu x:Key="FlyoutMenu" FontSize="14"
|
|
|
- >
|
|
|
- <ContextMenu.ItemContainerStyle>
|
|
|
- <Style TargetType="MenuItem">
|
|
|
- <Setter Property="Padding" Value="0,7,0,7"/>
|
|
|
- <Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
|
- </Style>
|
|
|
- </ContextMenu.ItemContainerStyle>
|
|
|
- <MenuItem Name="ChangeColorMenuItem" Click="ChangeColorMenuItem_Click" Header="更改颜色" IsEnabled="True">
|
|
|
- </MenuItem>
|
|
|
- <MenuItem Name="BackColorMenuItem" Header="恢复默认颜色" IsEnabled="True">
|
|
|
- </MenuItem>
|
|
|
- </ContextMenu>
|
|
|
-
|
|
|
- <Style x:Key="listboxItemStyle" TargetType="{x:Type ListBoxItem}">
|
|
|
- <Setter Property="ContextMenu" Value="{StaticResource FlyoutMenu}"/>
|
|
|
- <Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
|
- <Setter Property="Margin" Value="2,0,2,0"/>
|
|
|
- </Style>
|
|
|
+
|
|
|
</ResourceDictionary>
|
|
|
</UserControl.Resources>
|
|
|
<Grid Background="#F3F3F3">
|
|
|
<StackPanel>
|
|
|
<TextBlock Name="AnnotTypeTitle" FontFamily="SegoeUI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="10,8,0,0">Freehand</TextBlock>
|
|
|
- <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
|
|
|
- <Grid>
|
|
|
- <Path Name="FreehandPath" Fill="Red"
|
|
|
- Data="M89.6572823,33.0006836 C92.423623,33.0142613 94.9660238,33.2143167 97.6072943,33.6499257 L98.4450428,33.7953737 C99.2868308,33.9487663 100.141867,
|
|
|
- 34.1261641 101.020317,34.3291126 L101.906948,34.5406353 L102.811448,34.7695353 L103.736075,35.016156 C103.891982,35.0587552 104.048822,35.1021072 104.206642,
|
|
|
- 35.1462189 L105.165696,35.4200646 L106.150524,35.7124896 L107.163387,36.0238374 L108.206543,36.3544513 L109.833019,36.8872476 L110.961791,37.2675295 L112.128763,
|
|
|
- 37.6682797 L113.955787,38.3085341 L117.402465,39.5399202 L119.211464,40.1769086 L120.364856,40.5761585 L122.021403,41.1378013 L123.079875,41.487923 L124.104139,
|
|
|
- 41.8190107 L125.096343,42.1314171 C125.259158,42.1819476 125.420727,42.2317145 125.581094,42.280725 L126.529238,42.5657708 L127.450693,42.833017 L128.347609,
|
|
|
- 43.0828164 L129.222133,43.3155218 L130.076415,43.5314857 L130.912603,43.7310609 C131.050579,43.7629773 131.187891,43.7942255 131.324583,43.8248129 L132.137658,
|
|
|
- 44.0004665 L132.938011,44.160613 L133.727789,44.3056054 L134.509141,44.4357963 C134.638784,44.4562809 134.768165,44.4761635 134.897329,44.4954514 L135.670072,
|
|
|
- 44.6041013 C136.183976,44.6718555 136.695845,44.7303299 137.208542,44.7799948 L137.978566,44.8479436 C138.492808,44.8889165 139.00931,44.921315 139.530938,
|
|
|
- 44.9456093 L140.317582,44.9760315 C140.976918,44.9964163 141.646502,45.0045057 142.331927,45.0012184 C154.775594,44.9415382 164.257125,42.4510186 170.805372,
|
|
|
- 37.5853682 L171.166146,37.3126111 L173,39.6890769 C165.853529,45.1864148 155.625487,47.9374967 142.34636,48.0011838 L141.913337,48.0018385 L141.058707,
|
|
|
- 47.9944256 C140.63492,47.9877681 140.216149,47.9766406 139.801147,47.960847 L138.975797,47.9229799 C137.333671,47.8345703 135.738542,47.6694101 134.110611,
|
|
|
- 47.4149484 L133.293542,47.2802176 C133.020028,47.232788 132.745234,47.1828197 132.46879,47.1302546 L131.634137,46.9647107 C130.793795,46.7912602 129.935277,
|
|
|
- 46.5939154 129.048609,46.3711075 L128.152187,46.1397538 C128.001097,46.0997609 127.849132,46.0590461 127.696246,46.0176023 L126.767518,45.7601317 C126.610766,
|
|
|
- 45.7157424 126.453,45.6706095 126.294176,45.6247256 L125.328153,45.3403539 L124.334496,45.0376121 L123.310988,44.7161518 L122.255414,44.3756242 L121.165555,
|
|
|
- 44.0156808 L120.039195,43.6359728 L118.874118,43.2361517 L117.668107,42.8158688 L116.418945,42.3747755 L112.974241,41.1440673 L111.779131,
|
|
|
- 40.7235819 L110.063231,40.1313765 L108.432894,39.5843521 L107.389894,39.2441882 L106.379456,38.9232327 L105.399396,38.6211366 L104.447526,38.3375511 C104.291109,
|
|
|
- 38.29181 104.135775,38.2468257 103.981479,38.2025908 L103.067797,37.9461172 C102.917471,37.9048512 102.768092,37.8643201 102.619615,37.8245166 L101.739201,
|
|
|
- 37.5943699 L100.878235,37.3813385 C99.6002783,37.0744533 98.3805774,36.8241548 97.1859334,36.6251448 L96.3928518,36.5000117 C95.6027538,36.3823605 94.8205132,
|
|
|
- 36.2869811 94.0362933,36.2123035 L93.2510493,36.1444683 L92.4622998,36.0900856 C91.9348126,36.0582371 91.4035311,36.0351242 90.8655406,36.020282 L90.053159,
|
|
|
- 36.0041634 C89.916802,36.0024914 89.7799346,36.0013218 89.6425113,36.0006473 C77.496861,35.941034 68.0266419,38.4266795 61.1957691,43.4127083 L60.8119345,
|
|
|
- 43.6976064 L59,41.3044387 C66.3048995,35.7911443 76.3008484,33.037972 88.9517247,33 L89.6572823,33.0006836 Z" >
|
|
|
- </Path>
|
|
|
- <Ellipse Name="ErasePath" Fill="#1A000000" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"></Ellipse>
|
|
|
- </Grid>
|
|
|
- </Border>
|
|
|
-
|
|
|
|
|
|
<Border Width="128" Height="32" Margin="0,12,0,0" BorderThickness="1" BorderBrush="#FFE2E3E6">
|
|
|
<Grid Name="ToolGrid">
|
|
@@ -94,7 +43,7 @@
|
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
- <ToggleButton Name="PenBtn" IsChecked="True" IsEnabled="False" Tag="PenBtn" Background="Transparent" BorderThickness="0" >
|
|
|
+ <ToggleButton Name="PenBtn" IsChecked="True" IsEnabled="True" Tag="PenBtn" Background="Transparent" BorderThickness="0" Click="PenBtn_Click" Command="{Binding PenCommand}" CommandParameter="{Binding ElementName=PenBtn}" >
|
|
|
<Image Width="16" Height="16">
|
|
|
<Image.Source>
|
|
|
<DrawingImage>
|
|
@@ -129,7 +78,7 @@
|
|
|
|
|
|
<Line HorizontalAlignment="Left" Style="{StaticResource lineStyle}" VerticalAlignment="Center" Grid.Column="1" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
|
|
|
|
|
|
- <ToggleButton Name="EraseBtn" Tag="EraseBtn" Background="Transparent" Grid.Column="1" BorderThickness="0" >
|
|
|
+ <ToggleButton Name="EraseBtn" Tag="EraseBtn" Background="Transparent" Grid.Column="1" BorderThickness="0" Click="EraseBtn_Click" Command="{Binding EraseCommand}" CommandParameter="{Binding ElementName=EraseBtn}">
|
|
|
<Path Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#000000" Data="M11,1.796875 L16.703125,7.5 L9.2109375,15 L5.0390625,15 L2.3984375,
|
|
|
12.3515625 L2.30688477,12.2502441 C2.22143555,12.1452637 2.15429688,12.0292969 2.10546875,11.9023438 C2.04036458,11.7330729 2.0078125,11.5572917 2.0078125,
|
|
|
11.375 C2.0078125,11.1927083 2.04036458,11.0169271 2.10546875,10.8476562 C2.15429688,10.7207031 2.2199707,
|
|
@@ -142,31 +91,45 @@
|
|
|
</Grid>
|
|
|
</Border>
|
|
|
|
|
|
- <StackPanel>
|
|
|
+
|
|
|
+ <Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
|
|
|
+ <Grid>
|
|
|
+ <Path Name="FreehandPath" Fill="Red"
|
|
|
+ Data="M89.6572823,33.0006836 C92.423623,33.0142613 94.9660238,33.2143167 97.6072943,33.6499257 L98.4450428,33.7953737 C99.2868308,33.9487663 100.141867,
|
|
|
+ 34.1261641 101.020317,34.3291126 L101.906948,34.5406353 L102.811448,34.7695353 L103.736075,35.016156 C103.891982,35.0587552 104.048822,35.1021072 104.206642,
|
|
|
+ 35.1462189 L105.165696,35.4200646 L106.150524,35.7124896 L107.163387,36.0238374 L108.206543,36.3544513 L109.833019,36.8872476 L110.961791,37.2675295 L112.128763,
|
|
|
+ 37.6682797 L113.955787,38.3085341 L117.402465,39.5399202 L119.211464,40.1769086 L120.364856,40.5761585 L122.021403,41.1378013 L123.079875,41.487923 L124.104139,
|
|
|
+ 41.8190107 L125.096343,42.1314171 C125.259158,42.1819476 125.420727,42.2317145 125.581094,42.280725 L126.529238,42.5657708 L127.450693,42.833017 L128.347609,
|
|
|
+ 43.0828164 L129.222133,43.3155218 L130.076415,43.5314857 L130.912603,43.7310609 C131.050579,43.7629773 131.187891,43.7942255 131.324583,43.8248129 L132.137658,
|
|
|
+ 44.0004665 L132.938011,44.160613 L133.727789,44.3056054 L134.509141,44.4357963 C134.638784,44.4562809 134.768165,44.4761635 134.897329,44.4954514 L135.670072,
|
|
|
+ 44.6041013 C136.183976,44.6718555 136.695845,44.7303299 137.208542,44.7799948 L137.978566,44.8479436 C138.492808,44.8889165 139.00931,44.921315 139.530938,
|
|
|
+ 44.9456093 L140.317582,44.9760315 C140.976918,44.9964163 141.646502,45.0045057 142.331927,45.0012184 C154.775594,44.9415382 164.257125,42.4510186 170.805372,
|
|
|
+ 37.5853682 L171.166146,37.3126111 L173,39.6890769 C165.853529,45.1864148 155.625487,47.9374967 142.34636,48.0011838 L141.913337,48.0018385 L141.058707,
|
|
|
+ 47.9944256 C140.63492,47.9877681 140.216149,47.9766406 139.801147,47.960847 L138.975797,47.9229799 C137.333671,47.8345703 135.738542,47.6694101 134.110611,
|
|
|
+ 47.4149484 L133.293542,47.2802176 C133.020028,47.232788 132.745234,47.1828197 132.46879,47.1302546 L131.634137,46.9647107 C130.793795,46.7912602 129.935277,
|
|
|
+ 46.5939154 129.048609,46.3711075 L128.152187,46.1397538 C128.001097,46.0997609 127.849132,46.0590461 127.696246,46.0176023 L126.767518,45.7601317 C126.610766,
|
|
|
+ 45.7157424 126.453,45.6706095 126.294176,45.6247256 L125.328153,45.3403539 L124.334496,45.0376121 L123.310988,44.7161518 L122.255414,44.3756242 L121.165555,
|
|
|
+ 44.0156808 L120.039195,43.6359728 L118.874118,43.2361517 L117.668107,42.8158688 L116.418945,42.3747755 L112.974241,41.1440673 L111.779131,
|
|
|
+ 40.7235819 L110.063231,40.1313765 L108.432894,39.5843521 L107.389894,39.2441882 L106.379456,38.9232327 L105.399396,38.6211366 L104.447526,38.3375511 C104.291109,
|
|
|
+ 38.29181 104.135775,38.2468257 103.981479,38.2025908 L103.067797,37.9461172 C102.917471,37.9048512 102.768092,37.8643201 102.619615,37.8245166 L101.739201,
|
|
|
+ 37.5943699 L100.878235,37.3813385 C99.6002783,37.0744533 98.3805774,36.8241548 97.1859334,36.6251448 L96.3928518,36.5000117 C95.6027538,36.3823605 94.8205132,
|
|
|
+ 36.2869811 94.0362933,36.2123035 L93.2510493,36.1444683 L92.4622998,36.0900856 C91.9348126,36.0582371 91.4035311,36.0351242 90.8655406,36.020282 L90.053159,
|
|
|
+ 36.0041634 C89.916802,36.0024914 89.7799346,36.0013218 89.6425113,36.0006473 C77.496861,35.941034 68.0266419,38.4266795 61.1957691,43.4127083 L60.8119345,
|
|
|
+ 43.6976064 L59,41.3044387 C66.3048995,35.7911443 76.3008484,33.037972 88.9517247,33 L89.6572823,33.0006836 Z" >
|
|
|
+ </Path>
|
|
|
+ <Ellipse Name="ErasePath" Fill="#1A000000" Width="32" Height="32" HorizontalAlignment="Center" VerticalAlignment="Center" Visibility="Collapsed"></Ellipse>
|
|
|
+ </Grid>
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <StackPanel x:Name="PnlPen">
|
|
|
<Grid Margin="0,18,0,0">
|
|
|
<Grid.RowDefinitions>
|
|
|
<RowDefinition Height="auto"/>
|
|
|
<RowDefinition/>
|
|
|
</Grid.RowDefinitions>
|
|
|
<CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
|
|
|
- <Grid Grid.Row="1">
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
- <cus:ColorDropBox x:Name="ColorDropPicker" Grid.Column="1" BorderThickness="1" HorizontalAlignment="Right"
|
|
|
- BorderBrush="#E2E3E6" Width="80" Height="32">
|
|
|
- </cus:ColorDropBox>
|
|
|
- <ListBox x:Name="ListColor" ItemContainerStyle="{StaticResource listboxItemStyle}" ItemTemplate="{StaticResource listboxData}" BorderThickness="0" Background="Transparent">
|
|
|
- <ListBox.ItemsPanel>
|
|
|
- <ItemsPanelTemplate>
|
|
|
- <WrapPanel Orientation="Horizontal"/>
|
|
|
- </ItemsPanelTemplate>
|
|
|
- </ListBox.ItemsPanel>
|
|
|
-
|
|
|
- </ListBox>
|
|
|
- </Grid>
|
|
|
-
|
|
|
+
|
|
|
+ <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor"/>
|
|
|
</Grid>
|
|
|
|
|
|
<TextBlock x:Name="borderText" LineHeight="20" Margin="12,14,0,0" >Border</TextBlock>
|
|
@@ -176,7 +139,7 @@
|
|
|
<ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
<Slider Name="BorderSlider" VerticalAlignment="Center" Margin="12,0,4,0" Minimum="1" Maximum="12" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
|
|
|
- Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True" >
|
|
|
+ Style="{StaticResource RoundThumbSlider}" TickFrequency="1" IsSnapToTickEnabled="True" Value="{Binding ThicknessLine}">
|
|
|
<Slider.Resources>
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
|
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.ControlDarkDarkBrushKey}" Color="#E2E3E6" />
|
|
@@ -223,7 +186,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
- <StackPanel x:Name="PanelEraser">
|
|
|
+ <StackPanel x:Name="PnlEraser">
|
|
|
<TextBlock x:Name="eText" LineHeight="20" Margin="12,14,0,0" >Border</TextBlock>
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|