|
@@ -117,9 +117,7 @@
|
|
|
<RadioButton x:Name="SharpRectBtn" Tag="Rect" GroupName="Shape"
|
|
|
Width="32" Height="32" Margin="0,0" ToolTip="矩形" Padding="7,0,0,0"
|
|
|
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}">
|
|
|
<RadioButton.Content>
|
|
|
<Rectangle
|
|
@@ -129,15 +127,17 @@
|
|
|
VerticalAlignment="Center"
|
|
|
Stroke="#273C62" />
|
|
|
</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 x:Name="SharpCircleBtn" Tag="Circle" GroupName="Shape" Grid.Column="1"
|
|
|
Width="32" Height="32" Margin="0,0" ToolTip="圆" Padding="7,0,0,0"
|
|
|
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}">
|
|
|
<RadioButton.Content>
|
|
|
<Ellipse
|
|
@@ -147,15 +147,17 @@
|
|
|
VerticalAlignment="Center"
|
|
|
Stroke="#273C62" />
|
|
|
</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 x:Name="SharpArrowBtn" Tag="Arrow" GroupName="Shape" Grid.Column="2"
|
|
|
Width="32" Height="32" Margin="0,0" ToolTip="箭头" Padding="7,0,0,0"
|
|
|
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}">
|
|
|
<RadioButton.Content>
|
|
|
<Path
|
|
@@ -169,15 +171,16 @@
|
|
|
</Path.Data>
|
|
|
</Path>
|
|
|
</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 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}">
|
|
|
<RadioButton.Content>
|
|
|
<Polygon
|
|
@@ -191,7 +194,11 @@
|
|
|
</Polygon.Points>
|
|
|
</Polygon>
|
|
|
</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>
|
|
|
</Grid>
|
|
|
</Border>
|