ConverterImgDialog.xaml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <UserControl
  2. x:Class="PDF_Office.Views.Dialog.ConverterDialogs.ConverterImgDialog"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:converterdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.ConverterDialogs"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  8. xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  9. xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="480"
  14. Height="416"
  15. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterImgDialogViewModel}"
  16. d:DesignHeight="416"
  17. d:DesignWidth="480"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d">
  21. <cus:DialogContent Header="PDF转图片">
  22. <cus:DialogContent.Content>
  23. <Grid Grid.Row="1">
  24. <Grid.ColumnDefinitions>
  25. <ColumnDefinition Width="212" />
  26. <ColumnDefinition Width="*" />
  27. </Grid.ColumnDefinitions>
  28. <Grid Grid.Column="0">
  29. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <StackPanel Margin="18,16,0,0">
  33. <StackPanel>
  34. <TextBlock
  35. Width="48"
  36. Height="20"
  37. HorizontalAlignment="Left"
  38. Text="文件类型" />
  39. <ComboBox
  40. Name="ImageTypeComboBox"
  41. Width="228"
  42. Height="32"
  43. Margin="0,8,0,0"
  44. HorizontalAlignment="Left"
  45. ItemsSource="{Binding ImageTypeFamily}"
  46. SelectedIndex="{Binding ImageTypeSelectedIndex, Mode=TwoWay}"
  47. />
  48. <ComboBox
  49. Name="ImageDPIComboBox"
  50. Width="228"
  51. Height="32"
  52. Margin="0,8,0,0"
  53. HorizontalAlignment="Left"
  54. ItemsSource="{Binding ImageDPIFamily}"
  55. SelectedIndex="{Binding ImageDPISelectedIndex, Mode=TwoWay}"
  56. />
  57. </StackPanel>
  58. <StackPanel Margin="0,16,0,0">
  59. <TextBlock
  60. Width="48"
  61. Height="20"
  62. HorizontalAlignment="Left"
  63. Text="页面范围" />
  64. <cus:WritableComboBox
  65. x:Name="PageRangeComboBox"
  66. Width="228"
  67. Height="32"
  68. Margin="0,4,0,0"
  69. HorizontalAlignment="Left"
  70. IsCurrentPage="True"
  71. Loaded="PageRangeComboBox_Loaded"
  72. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  73. Text="{Binding PageRangeText, Mode=TwoWay}" >
  74. <i:Interaction.Triggers>
  75. <i:EventTrigger EventName="SelectionChanged">
  76. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  77. </i:EventTrigger>
  78. <i:EventTrigger EventName="TextChanged">
  79. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  80. </i:EventTrigger>
  81. </i:Interaction.Triggers>
  82. </cus:WritableComboBox>
  83. </StackPanel>
  84. </StackPanel>
  85. </Grid>
  86. </Grid>
  87. </cus:DialogContent.Content>
  88. <cus:DialogContent.BottmBar>
  89. <Grid>
  90. <Button
  91. Width="98"
  92. Height="32"
  93. Margin="0,0,124,0"
  94. HorizontalAlignment="Right"
  95. Command="{Binding CancelCommand}"
  96. Content="取消" />
  97. <Button
  98. Width="98"
  99. Height="32"
  100. Margin="16,0"
  101. HorizontalAlignment="Right"
  102. Command="{Binding ConverterCommnad}"
  103. Content="转换" />
  104. </Grid>
  105. </cus:DialogContent.BottmBar>
  106. </cus:DialogContent>
  107. </UserControl>