|
@@ -21,9 +21,13 @@
|
|
mc:Ignorable="d">
|
|
mc:Ignorable="d">
|
|
<UserControl.Resources>
|
|
<UserControl.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary>
|
|
|
|
+ <ResourceDictionary.MergedDictionaries>
|
|
|
|
+ <ResourceDictionary Source="pack://application:,,,/Styles/RadioButtonStyle.xaml" />
|
|
|
|
+ </ResourceDictionary.MergedDictionaries>
|
|
<Convert:ObjectConvert x:Key="ObjectConvert" />
|
|
<Convert:ObjectConvert x:Key="ObjectConvert" />
|
|
<Convert:StringToVisibleConvert x:Key="StringToVisibleConvert" />
|
|
<Convert:StringToVisibleConvert x:Key="StringToVisibleConvert" />
|
|
<Convert:StringToUnVisibleConvert x:Key="StringToUnVisibleConvert" />
|
|
<Convert:StringToUnVisibleConvert x:Key="StringToUnVisibleConvert" />
|
|
|
|
+ <Convert:BoolToVisible x:Key="BoolToVisible" />
|
|
</ResourceDictionary>
|
|
</ResourceDictionary>
|
|
</UserControl.Resources>
|
|
</UserControl.Resources>
|
|
<Grid>
|
|
<Grid>
|
|
@@ -42,25 +46,27 @@
|
|
Name="ToggleButtonTab"
|
|
Name="ToggleButtonTab"
|
|
Margin="12,0,0,0"
|
|
Margin="12,0,0,0"
|
|
Orientation="Horizontal">
|
|
Orientation="Horizontal">
|
|
- <ToggleButton
|
|
|
|
|
|
+ <RadioButton
|
|
Name="LinkPageBtn"
|
|
Name="LinkPageBtn"
|
|
Width="75"
|
|
Width="75"
|
|
Height="28"
|
|
Height="28"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
- Background="Transparent"
|
|
|
|
- BorderThickness="0"
|
|
|
|
Command="{Binding ToggleButtonTabCommand}"
|
|
Command="{Binding ToggleButtonTabCommand}"
|
|
|
|
+ GroupName="LinkTab"
|
|
IsChecked="True"
|
|
IsChecked="True"
|
|
|
|
+ Style="{StaticResource PageViewRadioBtn}"
|
|
Tag="Page">
|
|
Tag="Page">
|
|
- <ToggleButton.CommandParameter>
|
|
|
|
- <MultiBinding Converter="{StaticResource ResourceKey=ObjectConvert}" Mode="TwoWay">
|
|
|
|
- <MultiBinding.Bindings>
|
|
|
|
- <Binding ElementName="LinkPageBtn" />
|
|
|
|
- <Binding ElementName="LinkPageBtn" />
|
|
|
|
- <Binding ElementName="LinkPageBtn" />
|
|
|
|
- </MultiBinding.Bindings>
|
|
|
|
- </MultiBinding>
|
|
|
|
- </ToggleButton.CommandParameter>
|
|
|
|
|
|
+ <!--<ToggleButton.CommandParameter>
|
|
|
|
+ <MultiBinding Converter="{StaticResource ResourceKey=ObjectConvert}" Mode="TwoWay">
|
|
|
|
+ <MultiBinding.Bindings>
|
|
|
|
+ <Binding ElementName="LinkPageBtn" />
|
|
|
|
+ -->
|
|
|
|
+ <!--<Binding ElementName="LinkWebBtn" />
|
|
|
|
+ <Binding ElementName="LinkMailBtn" />-->
|
|
|
|
+ <!--
|
|
|
|
+ </MultiBinding.Bindings>
|
|
|
|
+ </MultiBinding>
|
|
|
|
+ </ToggleButton.CommandParameter>-->
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<Path
|
|
<Path
|
|
Margin="8,8,8,8"
|
|
Margin="8,8,8,8"
|
|
@@ -84,16 +90,18 @@
|
|
TextAlignment="Center"
|
|
TextAlignment="Center"
|
|
TextWrapping="Wrap" />
|
|
TextWrapping="Wrap" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- </ToggleButton>
|
|
|
|
|
|
+ </RadioButton>
|
|
|
|
|
|
- <ToggleButton
|
|
|
|
|
|
+ <RadioButton
|
|
Name="LinkWebBtn"
|
|
Name="LinkWebBtn"
|
|
Width="75"
|
|
Width="75"
|
|
Height="28"
|
|
Height="28"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Background="Transparent"
|
|
Background="Transparent"
|
|
- BorderThickness="0"
|
|
|
|
Command="{Binding ToggleButtonTabCommand}"
|
|
Command="{Binding ToggleButtonTabCommand}"
|
|
|
|
+ GroupName="LinkTab"
|
|
|
|
+ IsChecked="False"
|
|
|
|
+ Style="{StaticResource PageViewRadioBtn}"
|
|
Tag="Web">
|
|
Tag="Web">
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<Path
|
|
<Path
|
|
@@ -123,16 +131,18 @@
|
|
</Path.Data>
|
|
</Path.Data>
|
|
</Path>
|
|
</Path>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- </ToggleButton>
|
|
|
|
|
|
+ </RadioButton>
|
|
|
|
|
|
- <ToggleButton
|
|
|
|
|
|
+ <RadioButton
|
|
Name="LinkMailBtn"
|
|
Name="LinkMailBtn"
|
|
Width="75"
|
|
Width="75"
|
|
Height="28"
|
|
Height="28"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Background="Transparent"
|
|
Background="Transparent"
|
|
- BorderThickness="0"
|
|
|
|
Command="{Binding ToggleButtonTabCommand}"
|
|
Command="{Binding ToggleButtonTabCommand}"
|
|
|
|
+ GroupName="LinkTab"
|
|
|
|
+ IsChecked="False"
|
|
|
|
+ Style="{StaticResource PageViewRadioBtn}"
|
|
Tag="Mail">
|
|
Tag="Mail">
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<Path
|
|
<Path
|
|
@@ -147,7 +157,7 @@
|
|
</Path.Data>
|
|
</Path.Data>
|
|
</Path>
|
|
</Path>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- </ToggleButton>
|
|
|
|
|
|
+ </RadioButton>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<Line
|
|
<Line
|
|
Width="232"
|
|
Width="232"
|
|
@@ -160,7 +170,7 @@
|
|
Y1="0"
|
|
Y1="0"
|
|
Y2="0" />
|
|
Y2="0" />
|
|
<Grid MinWidth="260">
|
|
<Grid MinWidth="260">
|
|
- <StackPanel Name="LinkPagePanel" Visibility="Visible">
|
|
|
|
|
|
+ <StackPanel Name="LinkPagePanel" Visibility="{Binding ElementName=LinkPageBtn, Path=IsChecked, Converter={StaticResource BoolToVisible}, Mode=OneWay}">
|
|
<TextBlock
|
|
<TextBlock
|
|
x:Name="TxtPage"
|
|
x:Name="TxtPage"
|
|
Height="20"
|
|
Height="20"
|
|
@@ -172,19 +182,35 @@
|
|
Text="Page" />
|
|
Text="Page" />
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Horizontal">
|
|
<Grid>
|
|
<Grid>
|
|
- <CustomControl:TextBoxEx
|
|
|
|
|
|
+ <!--<CustomControl:TextBoxEx
|
|
|
|
+ x:Name="PageNumText"
|
|
|
|
+ Width="228"
|
|
|
|
+ Height="32"
|
|
|
|
+ Margin="16,0"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
|
+ IsEnabled="False"
|
|
|
|
+ PlaceholderText="Enter target page">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="TextChanged">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding PageNumTextChangedCommand}" PassEventArgsToCommand="True" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </CustomControl:TextBoxEx>-->
|
|
|
|
+ <CustomControl:TextBoxWithTip
|
|
x:Name="PageNumText"
|
|
x:Name="PageNumText"
|
|
Width="228"
|
|
Width="228"
|
|
- Height="32"
|
|
|
|
Margin="16,0"
|
|
Margin="16,0"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
- PlaceholderText="Enter target page">
|
|
|
|
|
|
+ IsEnabled="False"
|
|
|
|
+ ShowTip="Collapsed"
|
|
|
|
+ Text="Enter target page"
|
|
|
|
+ TipText=" Page number error.">
|
|
<i:Interaction.Triggers>
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="TextChanged">
|
|
<i:EventTrigger EventName="TextChanged">
|
|
<i:InvokeCommandAction Command="{Binding PageNumTextChangedCommand}" PassEventArgsToCommand="True" />
|
|
<i:InvokeCommandAction Command="{Binding PageNumTextChangedCommand}" PassEventArgsToCommand="True" />
|
|
</i:EventTrigger>
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</i:Interaction.Triggers>
|
|
- </CustomControl:TextBoxEx>
|
|
|
|
|
|
+ </CustomControl:TextBoxWithTip>
|
|
<!--<Border
|
|
<!--<Border
|
|
Name="BorderPageNumText"
|
|
Name="BorderPageNumText"
|
|
Width="228"
|
|
Width="228"
|
|
@@ -254,20 +280,20 @@
|
|
LineHeight="20"
|
|
LineHeight="20"
|
|
TextAlignment="Center" />-->
|
|
TextAlignment="Center" />-->
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- <TextBlock
|
|
|
|
- Name="ErrorNumTips"
|
|
|
|
- Margin="12,0,0,0"
|
|
|
|
- Foreground="Red"
|
|
|
|
- Visibility="{Binding ErrorNumTipsVisibility}">
|
|
|
|
- Page number error.
|
|
|
|
|
|
+ <!--<TextBlock
|
|
|
|
+ Name="ErrorNumTips"
|
|
|
|
+ Margin="12,0,0,0"
|
|
|
|
+ Foreground="Red"
|
|
|
|
+ Visibility="{Binding ErrorNumTipsVisibility}">
|
|
|
|
+ Page number error.
|
|
</TextBlock>
|
|
</TextBlock>
|
|
<TextBlock
|
|
<TextBlock
|
|
- Name="ErrorRangeTips"
|
|
|
|
- Margin="12,0,0,0"
|
|
|
|
- Foreground="Red"
|
|
|
|
- Visibility="{Binding ErrorRangeTipsVisibility}">
|
|
|
|
- Page number out of range.
|
|
|
|
- </TextBlock>
|
|
|
|
|
|
+ Name="ErrorRangeTips"
|
|
|
|
+ Margin="12,0,0,0"
|
|
|
|
+ Foreground="Red"
|
|
|
|
+ Visibility="{Binding ErrorRangeTipsVisibility}">
|
|
|
|
+ Page number out of range.
|
|
|
|
+ </TextBlock>-->
|
|
<Button
|
|
<Button
|
|
Name="BtnLocation"
|
|
Name="BtnLocation"
|
|
Width="228"
|
|
Width="228"
|
|
@@ -295,7 +321,7 @@
|
|
Source="{Binding PreviewImage}"
|
|
Source="{Binding PreviewImage}"
|
|
Visibility="{Binding ImagePreviewVisibility}" />
|
|
Visibility="{Binding ImagePreviewVisibility}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- <StackPanel Name="LinkWebPanel" Visibility="Collapsed">
|
|
|
|
|
|
+ <StackPanel Name="LinkWebPanel" Visibility="{Binding ElementName=LinkWebBtn, Path=IsChecked, Converter={StaticResource BoolToVisible}, Mode=OneWay}">
|
|
<TextBlock
|
|
<TextBlock
|
|
Height="20"
|
|
Height="20"
|
|
Margin="16,12,0,4"
|
|
Margin="16,12,0,4"
|
|
@@ -365,7 +391,7 @@
|
|
Invalid link.
|
|
Invalid link.
|
|
</TextBlock>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- <StackPanel Name="LinkMailPanel" Visibility="Collapsed">
|
|
|
|
|
|
+ <StackPanel Name="LinkMailPanel" Visibility="{Binding ElementName=LinkMailBtn, Path=IsChecked, Converter={StaticResource BoolToVisible}, Mode=OneWay}">
|
|
<TextBlock
|
|
<TextBlock
|
|
Height="20"
|
|
Height="20"
|
|
Margin="12,12,0,4"
|
|
Margin="12,12,0,4"
|