PageRangeDialog.xaml 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <Window x:Class="ComPDFKit.Controls.PDFControl.PageRangeDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:ComPDFKit.Controls.PDFControl"
  7. xmlns:cpdfcommon="clr-namespace:ComPDFKit.Controls.Common"
  8. mc:Ignorable="d"
  9. ShowInTaskbar="False"
  10. ResizeMode="NoResize"
  11. Title="Settings" Height="580" Width="704" Loaded="Window_Loaded">
  12. <Window.Resources>
  13. <ResourceDictionary>
  14. <cpdfcommon:SecurityResourceConverter x:Key="SecurityResourceConverter"/>
  15. <cpdfcommon:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"></cpdfcommon:TextLengthToVisibilityConverter>
  16. <ResourceDictionary.MergedDictionaries>
  17. <ResourceDictionary Source="../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
  18. </ResourceDictionary.MergedDictionaries>
  19. </ResourceDictionary>
  20. </Window.Resources>
  21. <Grid Margin="24">
  22. <Grid.RowDefinitions>
  23. <RowDefinition></RowDefinition>
  24. <RowDefinition Height="auto"></RowDefinition>
  25. </Grid.RowDefinitions>
  26. <Grid.ColumnDefinitions>
  27. <ColumnDefinition Width="248"></ColumnDefinition>
  28. <ColumnDefinition></ColumnDefinition>
  29. </Grid.ColumnDefinitions>
  30. <Grid>
  31. <local:PreviewControl x:Name="PreviewControl"></local:PreviewControl>
  32. </Grid>
  33. <Grid Grid.Column="1">
  34. <Border BorderThickness="1" BorderBrush="#33000000" Margin="10,10,0,0" Height="190" VerticalAlignment="Top">
  35. <Grid Margin="10,20,10,0">
  36. <Grid.RowDefinitions>
  37. <RowDefinition></RowDefinition>
  38. <RowDefinition></RowDefinition>
  39. <RowDefinition></RowDefinition>
  40. <RowDefinition></RowDefinition>
  41. </Grid.RowDefinitions>
  42. <RadioButton x:Name="AllRangeRdo" Tag="All" Margin="0,0,0,8" IsChecked="True" Checked="RangeRdo_Checked">
  43. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Rdo_AllPages}" VerticalAlignment="Center" FontSize="14" FontFamily="Microsoft YaHei"></TextBlock>
  44. </RadioButton>
  45. <RadioButton x:Name="OddRangeRdo" Tag="Odd" Grid.Row="1" Margin="0,0,0,8" Checked="RangeRdo_Checked">
  46. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Rdo_OddPages}" VerticalAlignment="Center" FontSize="14" FontFamily="Microsoft YaHei"></TextBlock>
  47. </RadioButton>
  48. <RadioButton x:Name="EvenRangeRdo" Tag="Even" IsEnabled="{Binding IsEvenEnable}" Grid.Row="2" Margin="0,0,0,8" Checked="RangeRdo_Checked">
  49. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Rdo_EvenPages}" VerticalAlignment="Center" FontSize="14" FontFamily="Microsoft YaHei"></TextBlock>
  50. </RadioButton>
  51. <RadioButton x:Name="CustomRangeRdo" Tag="Custom" Grid.Row="3" Margin="0,0,0,8" Checked="RangeRdo_Checked">
  52. <StackPanel Orientation="Horizontal">
  53. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Rdo_CustomPages}" VerticalAlignment="Center" FontSize="14" FontFamily="Microsoft YaHei"></TextBlock>
  54. <Grid>
  55. <TextBox x:Name="RangeTbx" Margin="12,0,0,0" Text="{Binding PageRange, UpdateSourceTrigger=PropertyChanged}" Height="28" Width="150" IsEnabled="{Binding ElementName=CustomRangeRdo, Path=IsChecked}" VerticalContentAlignment="Center"></TextBox>
  56. <TextBlock Text="1,3,5-10" VerticalAlignment="Center" Margin="15,0,0,0" Visibility="{Binding ElementName=RangeTbx, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False" Foreground="#BBB"></TextBlock>
  57. </Grid>
  58. </StackPanel>
  59. </RadioButton>
  60. </Grid>
  61. </Border>
  62. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Text_PageRange}" Margin="20,3,0,0" Background="#fff" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" TextAlignment="Center" FontWeight="DemiBold" FontFamily="Microsoft YaHei"></TextBlock>
  63. </Grid>
  64. <Grid Grid.Row="1" Grid.ColumnSpan="2">
  65. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,12,0,12">
  66. <Button x:Name="ConfirmBtn" Height="32" Width="112" Margin="0,0,12,0" Click="ConfirmBtn_Click">
  67. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_OK}"></TextBlock>
  68. </Button>
  69. <Button x:Name="CancelBtn" Height="32" Width="112" Margin="0,0,24,0" Click="CancelBtn_Click">
  70. <TextBlock Text="{Binding Converter={StaticResource SecurityResourceConverter}, ConverterParameter=Button_Cancel}"></TextBlock>
  71. </Button>
  72. </StackPanel>
  73. </Grid>
  74. </Grid>
  75. </Window>