ConverterWordDialog.xaml 5.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <UserControl x:Class="PDF_Office.Views.Dialog.ConverterDialogs.ConverterWordDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  7. xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
  10. xmlns:prism="http://prismlibrary.com/"
  11. Width="480"
  12. Height="416"
  13. d:DataContext="{d:DesignInstance Type=pageeditdialogs:ExtractDialogViewModel}"
  14. d:DesignHeight="416"
  15. d:DesignWidth="480"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. mc:Ignorable="d">
  19. <cus:DialogContent Header="PDF转Word">
  20. <cus:DialogContent.Content>
  21. <Grid Grid.Row="1">
  22. <Grid.ColumnDefinitions>
  23. <ColumnDefinition Width="212"/>
  24. <ColumnDefinition Width="*"/>
  25. </Grid.ColumnDefinitions>
  26. <Grid Grid.Column="0" >
  27. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded"/>
  28. </Grid>
  29. <Grid Grid.Column="1">
  30. <StackPanel Orientation="Vertical" Margin="18,0,0,0">
  31. <StackPanel Orientation="Vertical" Margin="0,16,0,0" HorizontalAlignment="Left">
  32. <TextBlock Text="版面设置:" Width="60" Height="20" HorizontalAlignment="Left"/>
  33. <StackPanel Orientation="Horizontal" Margin="0,7,0,0">
  34. <RadioButton Name="FlowingTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=FlowingTextRadioBtn,Path=Name}">
  35. <TextBlock Text="保留流排文本"/>
  36. </RadioButton>
  37. <RadioButton Margin="15,0,0,0" Name="PageLayoutRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=PageLayoutRadioBtn,Path=Name}">
  38. <TextBlock Text="保留页面布局"/>
  39. </RadioButton>
  40. </StackPanel>
  41. </StackPanel>
  42. <StackPanel Orientation="Vertical" Margin="0,17,0,0">
  43. <StackPanel Orientation="Vertical">
  44. <TextBlock Text="文本识别设置:" HorizontalAlignment="Left" Width="84" Height="20"/>
  45. <CheckBox Name="OCRCheckBox" Margin="0,5,0,0">
  46. <TextBlock Text="在需要时识别文本"/>
  47. </CheckBox>
  48. <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,6,0,0" Width="228" Height="28.55" HorizontalAlignment="Left">
  49. </ComboBox>
  50. </StackPanel>
  51. <StackPanel Orientation="Vertical" Margin="0,14,0,0">
  52. <TextBlock Text="页面范围" Height="20" Width="48" HorizontalAlignment="Left"/>
  53. <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,4,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" Loaded="PageRangeComboBox_Loaded">
  54. <i:Interaction.Triggers>
  55. <i:EventTrigger EventName="SelectionChanged">
  56. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  57. </i:EventTrigger>
  58. <i:EventTrigger EventName="TextChanged">
  59. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  60. </i:EventTrigger>
  61. </i:Interaction.Triggers>
  62. </cus:WritableComboBox>
  63. </StackPanel>
  64. </StackPanel>
  65. </StackPanel>
  66. </Grid>
  67. </Grid>
  68. </cus:DialogContent.Content>
  69. <cus:DialogContent.BottmBar>
  70. <Grid>
  71. <Button
  72. Width="98"
  73. Height="32"
  74. Margin="0,0,124,0"
  75. HorizontalAlignment="Right"
  76. Content="取消"
  77. Command="{Binding CancelCommand}"/>
  78. <Button
  79. Width="98"
  80. Height="32"
  81. Margin="16,0"
  82. HorizontalAlignment="Right"
  83. Content="转换"
  84. Command = "{Binding ConverterCommnad}"/>
  85. </Grid>
  86. </cus:DialogContent.BottmBar>
  87. </cus:DialogContent>
  88. </UserControl>