HomePageExtractDialog.xaml 4.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePageExtractDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  8. xmlns:prism="http://prismlibrary.com/"
  9. prism:ViewModelLocator.AutoWireViewModel="True"
  10. Height="404"
  11. Width="490"
  12. d:DesignHeight="404"
  13. d:DesignWidth="490"
  14. mc:Ignorable="d">
  15. <Grid>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="50"></RowDefinition>
  18. <RowDefinition Height="*"></RowDefinition>
  19. <RowDefinition Height="63"></RowDefinition>
  20. </Grid.RowDefinitions>
  21. <TextBlock Grid.Row="0" Text="提取" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
  22. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center" Height="291">
  23. <Grid>
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="212"/>
  26. <ColumnDefinition Width="*"/>
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Column="0">
  29. <cus:PageTurningPreview x:Name="ExtractPreview" Loaded="PageTurningPreview_Loaded" ></cus:PageTurningPreview>
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="5*"/>
  34. <RowDefinition Height="5*"/>
  35. </Grid.RowDefinitions>
  36. <Grid Grid.Row="0">
  37. <StackPanel Orientation="Vertical" Margin="0,40,0,0">
  38. <TextBlock Text="页面范围" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
  39. <cus:WritableComboBox x:Name="PageRangeComboBox" Width="208" Height="32" HorizontalAlignment="Left" Margin="0,20,0,0" Text="{Binding PageRangeText,Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}" >
  40. <i:Interaction.Triggers>
  41. <i:EventTrigger EventName="SelectionChanged">
  42. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ExtractPreview}" />
  43. </i:EventTrigger>
  44. <i:EventTrigger EventName="TextChanged">
  45. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ExtractPreview}" />
  46. </i:EventTrigger>
  47. </i:Interaction.Triggers>
  48. </cus:WritableComboBox>
  49. </StackPanel>
  50. </Grid>
  51. <Grid Grid.Row="1">
  52. <StackPanel Orientation="Vertical">
  53. <TextBlock Text="页面范围" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
  54. <CheckBox Margin="0,20,0,0" Command="{Binding ExtractToSingleFileCommand}" IsChecked="{Binding ExtractToSingleFileIsCheck}">
  55. <TextBlock Text="每个页面作为单独页面"></TextBlock>
  56. </CheckBox>
  57. <CheckBox Margin="0,20,0,0" Command="{Binding DeleteAfterExtractCommand}" IsChecked="{Binding DeleteAfterExtractIsCheck}">
  58. <TextBlock Text="提取后删除页面"></TextBlock>
  59. </CheckBox>
  60. </StackPanel>
  61. </Grid>
  62. </Grid>
  63. </Grid>
  64. </Border>
  65. <Grid Grid.Row="2">
  66. <Button
  67. Width="98"
  68. Height="32"
  69. Margin="0,0,124,0"
  70. HorizontalAlignment="Right"
  71. Command="{Binding ExtractCommand}"
  72. Content="提取" />
  73. <Button
  74. Width="98"
  75. Height="32"
  76. Margin="16,0"
  77. HorizontalAlignment="Right"
  78. Command="{Binding CancelCommand}"
  79. Content="取消" />
  80. </Grid>
  81. </Grid>
  82. </UserControl>