CPDFPageExtractUI.xaml 4.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <UserControl x:Class="Compdfkit_Tools.PDFControlUI.CPDFPageExtractUI"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:Compdfkit_Tools.PDFControlUI"
  7. xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
  8. mc:Ignorable="d"
  9. d:DesignHeight="378" d:DesignWidth="432"
  10. Background="#FFF"
  11. BorderThickness="1">
  12. <UserControl.Resources>
  13. <ResourceDictionary>
  14. <cpdfcommon:ReverseBoolConverter x:Key="ReverseBoolConverter"></cpdfcommon:ReverseBoolConverter>
  15. </ResourceDictionary>
  16. </UserControl.Resources>
  17. <Grid>
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="30"></RowDefinition>
  20. <RowDefinition Height="200"></RowDefinition>
  21. <RowDefinition></RowDefinition>
  22. <RowDefinition Height="57"></RowDefinition>
  23. </Grid.RowDefinitions>
  24. <TextBlock Text="Extract" FontSize="14" Margin="12,6" HorizontalAlignment="Left" VerticalAlignment="Top"></TextBlock>
  25. <Grid Grid.Row="1">
  26. <Border BorderBrush="#1A000000" BorderThickness="1" Width="382" Height="190" Margin="25,0,25,0">
  27. <StackPanel Orientation="Vertical" Margin="17">
  28. <RadioButton Margin="0,20,0,0" x:Name="AllPagesRadioButton" GroupName="PageRange" IsChecked="True" Tag="AllPages" Click="PageRangeRadioButtonClick">
  29. <TextBlock Text="All Pages"></TextBlock>
  30. </RadioButton>
  31. <RadioButton Margin="0,20,0,0" x:Name="OddPagesRadioButton" GroupName="PageRange" Tag="OddPages" Click="PageRangeRadioButtonClick">
  32. <TextBlock Text="Odd Pages Only"></TextBlock>
  33. </RadioButton>
  34. <RadioButton Margin="0,20,0,0" x:Name="EvenPagesRadioButton" GroupName="PageRange" Tag="EvenPages" Click="PageRangeRadioButtonClick">
  35. <TextBlock Text="Even Pages Only"></TextBlock>
  36. </RadioButton>
  37. <StackPanel Orientation="Horizontal" Margin="0,16,0,0">
  38. <RadioButton x:Name="CustomPagesRadioButton" VerticalAlignment="Center" Tag="CustomPages" GroupName="PageRange" Click="PageRangeRadioButtonClick">
  39. <TextBlock Text="Custom Range"></TextBlock>
  40. </RadioButton>
  41. <TextBox x:Name="CustomPageRangeTextBox" Height="32" Width="135" Margin="12,0,0,0" IsEnabled="{Binding ElementName=CustomPagesRadioButton, Path=IsChecked}" TextChanged="TextBox_TextChanged" VerticalContentAlignment="Center"></TextBox>
  42. <TextBlock Text="/" VerticalAlignment="Center" Margin="8,0,0,0"></TextBlock>
  43. <TextBlock x:Name="MaxPageTextBlock" Text="10000" VerticalAlignment="Center" Margin="8,0,0,0"></TextBlock>
  44. </StackPanel>
  45. </StackPanel>
  46. </Border>
  47. <TextBlock Text="Page Range" FontFamily="Segoe UI" Margin="40,-1,0,0" Background="White" Width="70" Height="16" VerticalAlignment="Top" HorizontalAlignment="Left" FontWeight="Bold"></TextBlock>
  48. </Grid>
  49. <Grid Grid.Row="2">
  50. <StackPanel Margin="42,10,0,0">
  51. <CheckBox Margin="0,10,0,0" Click="SeparateCheckBoxClick" >
  52. <TextBlock Text="Each page in a separate file"></TextBlock>
  53. </CheckBox>
  54. <CheckBox x:Name="DeleteCheckBox" Margin="0,16,0,0" Click="DeleteCheckBoxClick" IsEnabled="{Binding ElementName=AllPagesRadioButton, Path=IsChecked, Converter={StaticResource ReverseBoolConverter}}">
  55. <TextBlock Text="Delete pages after extraction"></TextBlock>
  56. </CheckBox>
  57. </StackPanel>
  58. </Grid>
  59. <StackPanel HorizontalAlignment="Right" Grid.Row="3" Orientation="Horizontal" Margin="0,0,25,0">
  60. <Button x:Name="CancelButton" Height="32" Width="112" Click="CancelButton_Click">
  61. <TextBlock Text="Cancel"></TextBlock>
  62. </Button>
  63. <Button x:Name="ExtractButton" Height="32" Width="112" Margin="8,0,0,0" Click="ExtractButton_Click">
  64. <TextBlock Text="Extract"></TextBlock>
  65. </Button>
  66. </StackPanel>
  67. </Grid>
  68. </UserControl>