|
@@ -117,9 +117,7 @@
|
|
<RadioButton x:Name="SharpRectBtn" Tag="Rect" GroupName="Shape"
|
|
<RadioButton x:Name="SharpRectBtn" Tag="Rect" GroupName="Shape"
|
|
Width="32" Height="32" Margin="0,0" ToolTip="矩形" Padding="7,0,0,0"
|
|
Width="32" Height="32" Margin="0,0" ToolTip="矩形" Padding="7,0,0,0"
|
|
VerticalContentAlignment="Center" Background="Transparent"
|
|
VerticalContentAlignment="Center" Background="Transparent"
|
|
- Command="{Binding SharpsTypeCommand}"
|
|
|
|
- CommandParameter="{Binding ElementName=SharpRectBtn, Path=Tag}"
|
|
|
|
- IsChecked="{Binding StrShapeChecked,Converter={StaticResource AnnotToolIsCheckedConvert},ConverterParameter=Rect}"
|
|
|
|
|
|
+ IsChecked="{Binding IsRect}"
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
<RadioButton.Content>
|
|
<RadioButton.Content>
|
|
<Rectangle
|
|
<Rectangle
|
|
@@ -129,15 +127,17 @@
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="#273C62" />
|
|
Stroke="#273C62" />
|
|
</RadioButton.Content>
|
|
</RadioButton.Content>
|
|
-
|
|
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpRectBtn, Path=Tag}"/>
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
</RadioButton>
|
|
</RadioButton>
|
|
|
|
|
|
<RadioButton x:Name="SharpCircleBtn" Tag="Circle" GroupName="Shape" Grid.Column="1"
|
|
<RadioButton x:Name="SharpCircleBtn" Tag="Circle" GroupName="Shape" Grid.Column="1"
|
|
Width="32" Height="32" Margin="0,0" ToolTip="圆" Padding="7,0,0,0"
|
|
Width="32" Height="32" Margin="0,0" ToolTip="圆" Padding="7,0,0,0"
|
|
VerticalContentAlignment="Center" Background="Transparent"
|
|
VerticalContentAlignment="Center" Background="Transparent"
|
|
- Command="{Binding SharpsTypeCommand}"
|
|
|
|
- CommandParameter="{Binding ElementName=SharpCircleBtn, Path=Tag}"
|
|
|
|
- IsChecked="{Binding StrShapeChecked,Converter={StaticResource AnnotToolIsCheckedConvert},ConverterParameter=Circle}"
|
|
|
|
|
|
+ IsChecked="{Binding IsCircle}"
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
<RadioButton.Content>
|
|
<RadioButton.Content>
|
|
<Ellipse
|
|
<Ellipse
|
|
@@ -147,15 +147,17 @@
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Stroke="#273C62" />
|
|
Stroke="#273C62" />
|
|
</RadioButton.Content>
|
|
</RadioButton.Content>
|
|
-
|
|
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpCircleBtn, Path=Tag}"/>
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
</RadioButton>
|
|
</RadioButton>
|
|
|
|
|
|
<RadioButton x:Name="SharpArrowBtn" Tag="Arrow" GroupName="Shape" Grid.Column="2"
|
|
<RadioButton x:Name="SharpArrowBtn" Tag="Arrow" GroupName="Shape" Grid.Column="2"
|
|
Width="32" Height="32" Margin="0,0" ToolTip="箭头" Padding="7,0,0,0"
|
|
Width="32" Height="32" Margin="0,0" ToolTip="箭头" Padding="7,0,0,0"
|
|
VerticalContentAlignment="Center" Background="Transparent"
|
|
VerticalContentAlignment="Center" Background="Transparent"
|
|
- Command="{Binding SharpsTypeCommand}"
|
|
|
|
- CommandParameter="{Binding ElementName=SharpArrowBtn, Path=Tag}"
|
|
|
|
- IsChecked="{Binding StrShapeChecked,Converter={StaticResource AnnotToolIsCheckedConvert},ConverterParameter=Arrow}"
|
|
|
|
|
|
+ IsChecked="{Binding IsArrow}"
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
<RadioButton.Content>
|
|
<RadioButton.Content>
|
|
<Path
|
|
<Path
|
|
@@ -169,15 +171,16 @@
|
|
</Path.Data>
|
|
</Path.Data>
|
|
</Path>
|
|
</Path>
|
|
</RadioButton.Content>
|
|
</RadioButton.Content>
|
|
-
|
|
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpArrowBtn, Path=Tag}"/>
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
</RadioButton>
|
|
</RadioButton>
|
|
|
|
|
|
<RadioButton x:Name="SharpLineBtn" Tag="Line" GroupName="Shape" Grid.Column="3"
|
|
<RadioButton x:Name="SharpLineBtn" Tag="Line" GroupName="Shape" Grid.Column="3"
|
|
- Width="32" Height="32" Margin="0,0" ToolTip="线条" Padding="7,0,0,0"
|
|
|
|
- VerticalContentAlignment="Center" Background="Transparent"
|
|
|
|
- Command="{Binding SharpsTypeCommand}"
|
|
|
|
- CommandParameter="{Binding ElementName=SharpLineBtn, Path=Tag}"
|
|
|
|
- IsChecked="{Binding StrShapeChecked,Converter={StaticResource AnnotToolIsCheckedConvert},ConverterParameter=Line}"
|
|
|
|
|
|
+ Width="32" Height="32" Margin="0,0" ToolTip="线条" Padding="7,8,0,0"
|
|
|
|
+ IsChecked="{Binding IsLine}" Background="Transparent"
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
Style="{DynamicResource GreyBgRadioBtnStyle}">
|
|
<RadioButton.Content>
|
|
<RadioButton.Content>
|
|
<Polygon
|
|
<Polygon
|
|
@@ -191,7 +194,11 @@
|
|
</Polygon.Points>
|
|
</Polygon.Points>
|
|
</Polygon>
|
|
</Polygon>
|
|
</RadioButton.Content>
|
|
</RadioButton.Content>
|
|
-
|
|
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding SharpsTypeCommand}" CommandParameter="{Binding ElementName=SharpLineBtn, Path=Tag}"/>
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
</RadioButton>
|
|
</RadioButton>
|
|
</Grid>
|
|
</Grid>
|
|
</Border>
|
|
</Border>
|