ConverterWordDialog.xaml 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  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/" xmlns:converterdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.ConverterDialogs"
  11. Width="468"
  12. Height="454"
  13. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterWordDialogViewModel}"
  14. d:DesignHeight="454"
  15. d:DesignWidth="468"
  16. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  17. prism:ViewModelLocator.AutoWireViewModel="True"
  18. mc:Ignorable="d">
  19. <cus:DialogContent Header="{Binding T_Title}">
  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" VerticalAlignment="Top">
  27. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded"/>
  28. </Grid>
  29. <Grid Grid.Column="1">
  30. <StackPanel Orientation="Vertical" Margin="16,2,0,0">
  31. <StackPanel Orientation="Vertical" HorizontalAlignment="Left">
  32. <TextBlock Text="Layout Settings" Style="{StaticResource PropertyHeaderLv2}" Height="20" HorizontalAlignment="Left"/>
  33. <StackPanel Orientation="Vertical" Margin="0,8,0,0">
  34. <RadioButton Name="FlowingTextRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=FlowingTextRadioBtn,Path=Name}" IsEnabled="False" Style="{StaticResource RadioButtonStyleText}" Visibility="Collapsed"
  35. Padding="8,0,0,0">
  36. <TextBlock Text="Retain Flowing Text"/>
  37. </RadioButton>
  38. <RadioButton Margin="0,0,0,0" Name="PageLayoutRadioBtn" Command="{Binding RadioButtonCommand}" CommandParameter="{Binding ElementName=PageLayoutRadioBtn,Path=Name}" IsChecked="True" Style="{StaticResource RadioButtonStyleText}"
  39. Padding="8,0,0,0">
  40. <TextBlock Text="Retain Page Layout"/>
  41. </RadioButton>
  42. </StackPanel>
  43. </StackPanel>
  44. <StackPanel Orientation="Vertical" Margin="0,16,0,0">
  45. <StackPanel Orientation="Vertical" Visibility="Collapsed">
  46. <TextBlock Text="Text Recognition Settings" HorizontalAlignment="Left" Style="{StaticResource PropertyHeaderLv2}" Height="20"/>
  47. <CheckBox Name="OCRCheckBox" Margin="0,8,0,0" IsChecked="{Binding OCRCheckBoxIsCheckBox}" Padding="8,0,0,0">
  48. <TextBlock Text="Recognize text if needed"/>
  49. </CheckBox>
  50. <ComboBox IsEnabled="{Binding ElementName=OCRCheckBox,Path=IsChecked}" Margin="0,8,0,0" Width="228" Height="32" HorizontalAlignment="Left" SelectedIndex="{Binding LanguageSelectedIndex}">
  51. <ComboBoxItem Content="Chinese Simplified"/>
  52. <ComboBoxItem Content="Chinese Traditional"/>
  53. <ComboBoxItem Content="English"/>
  54. <ComboBoxItem Content="Japan"/>
  55. <ComboBoxItem Content="Korean"/>
  56. </ComboBox>
  57. </StackPanel>
  58. <StackPanel Orientation="Vertical" Margin="0,16,0,0">
  59. <TextBlock Text="Page Range" Height="20" Style="{StaticResource PropertyHeaderLv2}" HorizontalAlignment="Left"/>
  60. <cus:WritableComboBox x:Name="PageRangeComboBox" Margin="0,8,0,0" Width="228" Height="32" HorizontalAlignment="Left" IsCurrentPage="True" Text="{Binding PageRangeText, Mode=TwoWay}" MaxPageRange="{Binding MaxPageRange}" SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}" Loaded="PageRangeComboBox_Loaded">
  61. <i:Interaction.Triggers>
  62. <i:EventTrigger EventName="SelectionChanged">
  63. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  64. </i:EventTrigger>
  65. <i:EventTrigger EventName="TextChanged">
  66. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  67. </i:EventTrigger>
  68. <i:KeyTrigger FiredOn="KeyDown" Key="Return">
  69. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" ></i:InvokeCommandAction>
  70. </i:KeyTrigger>
  71. </i:Interaction.Triggers>
  72. </cus:WritableComboBox>
  73. </StackPanel>
  74. </StackPanel>
  75. </StackPanel>
  76. </Grid>
  77. </Grid>
  78. </cus:DialogContent.Content>
  79. <cus:DialogContent.BottmBar>
  80. <Grid>
  81. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  82. <Border>
  83. <TextBlock Text="批量处理" ></TextBlock>
  84. </Border>
  85. </Button>-->
  86. <Button
  87. Width="98"
  88. Height="32"
  89. Margin="0,0,16,0"
  90. HorizontalAlignment="Right"
  91. Content="{Binding T_No}"
  92. Command="{Binding CancelCommand}" Style="{StaticResource btn.sec}"/>
  93. <Button
  94. Width="98"
  95. Height="32"
  96. Margin="124,0"
  97. HorizontalAlignment="Right"
  98. Content="{Binding T_YES}"
  99. Command = "{Binding ConverterCommnad}" Style="{StaticResource Btn.cta}"/>
  100. </Grid>
  101. </cus:DialogContent.BottmBar>
  102. </cus:DialogContent>
  103. </UserControl>