|
@@ -17,10 +17,7 @@
|
|
</ResourceDictionary.MergedDictionaries>
|
|
</ResourceDictionary.MergedDictionaries>
|
|
<Convert:ColorToBrushConverter x:Key="ColorToBrushConvert"></Convert:ColorToBrushConverter>
|
|
<Convert:ColorToBrushConverter x:Key="ColorToBrushConvert"></Convert:ColorToBrushConverter>
|
|
<Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
|
|
<Convert:CheckToVisibleMutiConvert x:Key="CheckToVisibleMutiConvert"/>
|
|
- <DataTemplate x:Key="listboxData">
|
|
|
|
- <Ellipse Height="20" Width="20" Fill="{Binding}"/>
|
|
|
|
- </DataTemplate>
|
|
|
|
-
|
|
|
|
|
|
+
|
|
<Style x:Key="line1Style" TargetType="{x:Type Line}">
|
|
<Style x:Key="line1Style" TargetType="{x:Type Line}">
|
|
<Setter Property="Visibility">
|
|
<Setter Property="Visibility">
|
|
<Setter.Value>
|
|
<Setter.Value>
|
|
@@ -52,34 +49,11 @@
|
|
</Setter>
|
|
</Setter>
|
|
</Style>
|
|
</Style>
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- <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>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
</UserControl.Resources>
|
|
<Grid Background="#F3F3F3">
|
|
<Grid Background="#F3F3F3">
|
|
<StackPanel>
|
|
<StackPanel>
|
|
- <TextBlock Name="AnnotTypeTitle" FontFamily="SegoeUI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Center" Margin="0,8,0,0">Freehand</TextBlock>
|
|
|
|
|
|
+ <TextBlock Name="AnnotTypeTitle" Text="{Binding AnnotTypeTitle}" FontFamily="SegoeUI" FontWeight="Bold" FontSize="18" LineHeight="24" HorizontalAlignment="Left" Margin="10,8,0,0" />
|
|
<Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
|
|
<Border Width="228" Height="100" BorderThickness="1" CornerRadius="2" BorderBrush="#DDDDDD" Background="White" Margin="0,8,0,0">
|
|
<Grid>
|
|
<Grid>
|
|
<!--<Path Name="SharpPath" Opacity="{Binding ElementName=OpacitySlider,Path=Value}" StrokeThickness="{Binding ElementName=ThicknessSlider,Path=Value}"
|
|
<!--<Path Name="SharpPath" Opacity="{Binding ElementName=OpacitySlider,Path=Value}" StrokeThickness="{Binding ElementName=ThicknessSlider,Path=Value}"
|
|
@@ -101,7 +75,7 @@
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
|
|
|
|
|
|
- <ToggleButton Name="SharpRectBtn" Tag="Rect" Width="40.5" Background="Transparent" BorderThickness="0">
|
|
|
|
|
|
+ <ToggleButton Name="SharpRectBtn" Tag="Rect" Width="40.5" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click">
|
|
<Rectangle HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Stroke="#273C62"></Rectangle>
|
|
<Rectangle HorizontalAlignment="Center" VerticalAlignment="Center" Width="16" Height="16" Stroke="#273C62"></Rectangle>
|
|
</ToggleButton>
|
|
</ToggleButton>
|
|
|
|
|
|
@@ -109,13 +83,13 @@
|
|
|
|
|
|
</Line>
|
|
</Line>
|
|
|
|
|
|
- <ToggleButton Name="SharpCircleBtn" Width="40.5" Tag="Circle" Grid.Column="1" Background="Transparent" BorderThickness="0" Margin="0,0,0,0">
|
|
|
|
|
|
+ <ToggleButton Name="SharpCircleBtn" Width="40.5" Tag="Circle" Grid.Column="1" Background="Transparent" BorderThickness="0" Margin="0,0,0,0" Click="SharpsBtn_Click">
|
|
<Ellipse Width="16" Height="16" Stroke="#273C62" HorizontalAlignment="Center" VerticalAlignment="Center" ></Ellipse>
|
|
<Ellipse Width="16" Height="16" Stroke="#273C62" HorizontalAlignment="Center" VerticalAlignment="Center" ></Ellipse>
|
|
</ToggleButton>
|
|
</ToggleButton>
|
|
|
|
|
|
|
|
|
|
<Line Name="line2" HorizontalAlignment="Left" Style="{StaticResource line2Style}" VerticalAlignment="Center" Grid.Column="2" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
|
|
<Line Name="line2" HorizontalAlignment="Left" Style="{StaticResource line2Style}" VerticalAlignment="Center" Grid.Column="2" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
|
|
- <ToggleButton Name="SharpArrowBtn" Width="40.5" Tag="Arrow" Grid.Column="2" Background="Transparent" BorderThickness="0" >
|
|
|
|
|
|
+ <ToggleButton Name="SharpArrowBtn" Width="40.5" Tag="Arrow" Grid.Column="2" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click">
|
|
<Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62" Width="16" Height="16">
|
|
<Path HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62" Width="16" Height="16">
|
|
<Path.Data>
|
|
<Path.Data>
|
|
M13.4,2.6 L13.4,8 L12.2,8 L12.1997359,4.648 L2.02426407,14.8242641 L1.17573593,13.9757359 L11.3517359,3.799 L8,3.8 L8,2.6 L13.4,2.6 Z
|
|
M13.4,2.6 L13.4,8 L12.2,8 L12.1997359,4.648 L2.02426407,14.8242641 L1.17573593,13.9757359 L11.3517359,3.799 L8,3.8 L8,2.6 L13.4,2.6 Z
|
|
@@ -124,7 +98,7 @@
|
|
</ToggleButton>
|
|
</ToggleButton>
|
|
|
|
|
|
<Line x:Name="line3" HorizontalAlignment="Left" Style="{StaticResource line3Style}" VerticalAlignment="Center" Grid.Column="3" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
|
|
<Line x:Name="line3" HorizontalAlignment="Left" Style="{StaticResource line3Style}" VerticalAlignment="Center" Grid.Column="3" X1="0" Y1="0" X2="0" Y2="16" StrokeThickness="1" Stroke="#33000000"></Line>
|
|
- <ToggleButton Name="SharpLineBtn" Width="40.5" Tag="Line" Grid.Column="3" Background="Transparent" BorderThickness="0">
|
|
|
|
|
|
+ <ToggleButton Name="SharpLineBtn" Width="40.5" Tag="Line" Grid.Column="3" Background="Transparent" BorderThickness="0" Click="SharpsBtn_Click">
|
|
<Polygon Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62">
|
|
<Polygon Width="16" Height="16" HorizontalAlignment="Center" VerticalAlignment="Center" Fill="#273C62">
|
|
<Polygon.Points>
|
|
<Polygon.Points>
|
|
13.1757359 1.97573593 14.0242641 2.82426407 2.82426407 14.0242641 1.97573593 13.1757359
|
|
13.1757359 1.97573593 14.0242641 2.82426407 2.82426407 14.0242641 1.97573593 13.1757359
|
|
@@ -136,30 +110,13 @@
|
|
</Border>
|
|
</Border>
|
|
|
|
|
|
|
|
|
|
- <Grid Margin="0,18,0,0">
|
|
|
|
|
|
+ <Grid Margin="0,18,0,0" x:Name="GridFill">
|
|
<Grid.RowDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition Height="auto"/>
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
</Grid.RowDefinitions>
|
|
<CommonControls:SlidContent x:Name="layerFill" HorizontalAlignment="Right"/>
|
|
<CommonControls:SlidContent x:Name="layerFill" HorizontalAlignment="Right"/>
|
|
- <Grid Grid.Row="1">
|
|
|
|
- <Grid.ColumnDefinitions>
|
|
|
|
- <ColumnDefinition Width="*"></ColumnDefinition>
|
|
|
|
- <ColumnDefinition Width="auto"></ColumnDefinition>
|
|
|
|
- </Grid.ColumnDefinitions>
|
|
|
|
- <cus:ColorDropBox x:Name="ColorFillDropPicker" Grid.Column="1" BorderThickness="1" HorizontalAlignment="Right"
|
|
|
|
- BorderBrush="#E2E3E6" Width="80" Height="32">
|
|
|
|
- </cus:ColorDropBox>
|
|
|
|
- <ListBox x:Name="ListColorFill" 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="cusFillColor"/>
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
<Grid Margin="0,18,0,0">
|
|
<Grid Margin="0,18,0,0">
|
|
@@ -168,23 +125,7 @@
|
|
<RowDefinition/>
|
|
<RowDefinition/>
|
|
</Grid.RowDefinitions>
|
|
</Grid.RowDefinitions>
|
|
<CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
|
|
<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>
|
|
</Grid>
|
|
|
|
|
|
@@ -195,7 +136,7 @@
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="*"></ColumnDefinition>
|
|
<ColumnDefinition Width="auto"></ColumnDefinition>
|
|
<ColumnDefinition Width="auto"></ColumnDefinition>
|
|
</Grid.ColumnDefinitions>
|
|
</Grid.ColumnDefinitions>
|
|
- <Slider Name="BorderSlider" VerticalAlignment="Center" Margin="12,0,4,0" Minimum="1" Maximum="12" IsSelectionRangeEnabled="True" IsMoveToPointEnabled="True"
|
|
|
|
|
|
+ <Slider Name="BorderSlider" VerticalAlignment="Center" Value="{Binding LineWidth}" 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" >
|
|
<Slider.Resources>
|
|
<Slider.Resources>
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
|
|
<SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="#477EDE" />
|
|
@@ -225,15 +166,17 @@
|
|
</Grid>
|
|
</Grid>
|
|
|
|
|
|
|
|
|
|
- <StackPanel Orientation="Horizontal" Margin="0,20,0,0">
|
|
|
|
- <cus:CustomIconToggleBtn x:Name="BtnListMode" Tag="Line" Width="110" Height="32"
|
|
|
|
|
|
+ <StackPanel x:Name="PnlLineStyle" Orientation="Horizontal" Margin="0,20,0,0">
|
|
|
|
+ <cus:CustomIconToggleBtn x:Name="BtnSolidLine" Tag="Solid" Width="110" Height="32" Click="BtnLineStyle_Click"
|
|
|
|
+ Command="{Binding LineStyleCommand}" CommandParameter="{Binding ElementName=BtnSolidLine,Path=Tag}"
|
|
Style="{StaticResource ToggleBtnViewModeStyle}">
|
|
Style="{StaticResource ToggleBtnViewModeStyle}">
|
|
<Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30">
|
|
<Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30">
|
|
<Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" />
|
|
<Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" />
|
|
</Border>
|
|
</Border>
|
|
</cus:CustomIconToggleBtn>
|
|
</cus:CustomIconToggleBtn>
|
|
- <cus:CustomIconToggleBtn x:Name="BtnListMode1" Tag="Line" Width="110" Height="32"
|
|
|
|
- Style="{StaticResource ToggleBtnViewModeStyle}">
|
|
|
|
|
|
+ <cus:CustomIconToggleBtn x:Name="BtnDottedLine" Tag="Dotted" Width="110" Height="32"
|
|
|
|
+ Command="{Binding LineStyleCommand}" CommandParameter="{Binding ElementName=BtnDottedLine,Path=Tag}"
|
|
|
|
+ Style="{StaticResource ToggleBtnViewModeStyle}" Click="BtnLineStyle_Click">
|
|
<Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30" >
|
|
<Border BorderBrush="Black" BorderThickness="1" Padding="8,0,8,0" Width="108" Height="30" >
|
|
<Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" StrokeDashArray="2"/>
|
|
<Line X1="10" Y1="15" X2="260" Y2="15" Stroke="Black" StrokeThickness="2" StrokeDashArray="2"/>
|
|
</Border>
|
|
</Border>
|