ConverterImgDialog.xaml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <UserControl
  2. x:Class="PDF_Master.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_Master.ViewModels.Dialog.ConverterDialogs"
  6. xmlns:cus="clr-namespace:PDF_Master.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_Master.Views.Dialog.PageEditDialogs"
  10. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  11. xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
  12. xmlns:prism="http://prismlibrary.com/"
  13. Width="468"
  14. Height="454"
  15. d:DataContext="{d:DesignInstance Type=converterdialogs:ConverterImgDialogViewModel}"
  16. d:DesignHeight="454"
  17. d:DesignWidth="468"
  18. prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
  19. prism:ViewModelLocator.AutoWireViewModel="True"
  20. mc:Ignorable="d">
  21. <cus:DialogContent Header="{Binding T_Title}">
  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" VerticalAlignment="Top">
  29. <cus:PageTurningPreview x:Name="ConverterPreview" Loaded="ConverterPreview_Loaded" />
  30. </Grid>
  31. <Grid Grid.Column="1">
  32. <StackPanel Margin="16,2,0,0">
  33. <StackPanel>
  34. <TextBlock
  35. Style="{StaticResource PropertyHeaderLv2}"
  36. Height="20"
  37. HorizontalAlignment="Left"
  38. Text="File Type" />
  39. <ComboBox
  40. Name="ImageTypeComboBox"
  41. Width="228"
  42. Height="32"
  43. Margin="0,10,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,18,0,0">
  59. <TextBlock
  60. Style="{StaticResource PropertyHeaderLv2}"
  61. Height="20"
  62. HorizontalAlignment="Left"
  63. Text="Page Range" />
  64. <cus:WritableComboBox
  65. x:Name="PageRangeComboBox"
  66. Width="228"
  67. Height="32"
  68. Margin="0,10,0,0"
  69. HorizontalAlignment="Left"
  70. IsCurrentPage="True"
  71. MaxPageRange="{Binding MaxPageRange}"
  72. Loaded="PageRangeComboBox_Loaded"
  73. SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
  74. Text="{Binding PageRangeText, Mode=TwoWay}" >
  75. <i:Interaction.Triggers>
  76. <i:EventTrigger EventName="SelectionChanged">
  77. <i:InvokeCommandAction Command="{Binding CmbPageSelectionChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  78. </i:EventTrigger>
  79. <i:EventTrigger EventName="TextChanged">
  80. <i:InvokeCommandAction Command="{Binding CmbPageTextChanged}" CommandParameter="{Binding ElementName=ConverterPreview}" />
  81. </i:EventTrigger>
  82. <i:KeyTrigger FiredOn="KeyDown" Key="Return">
  83. <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" ></i:InvokeCommandAction>
  84. </i:KeyTrigger>
  85. </i:Interaction.Triggers>
  86. </cus:WritableComboBox>
  87. </StackPanel>
  88. </StackPanel>
  89. </Grid>
  90. </Grid>
  91. </cus:DialogContent.Content>
  92. <cus:DialogContent.BottmBar>
  93. <Grid>
  94. <!--<Button Background="WhiteSmoke" Width="98" Height="32" Margin="0,0,350,0" Command="{Binding BatchConverterCommand}" Style="{StaticResource btn.sec}">
  95. <Border>
  96. <TextBlock Text="批量处理" ></TextBlock>
  97. </Border>
  98. </Button>-->
  99. <Button
  100. Width="98"
  101. Height="32"
  102. Margin="0,0,16,0"
  103. HorizontalAlignment="Right"
  104. Command="{Binding CancelCommand}"
  105. Content="{Binding T_No}" Style="{StaticResource btn.sec}"/>
  106. <Button
  107. Width="98"
  108. Height="32"
  109. Margin="124,0"
  110. HorizontalAlignment="Right"
  111. Command="{Binding ConverterCommnad}"
  112. Content="{Binding T_YES}"
  113. Style="{StaticResource Btn.cta}"/>
  114. </Grid>
  115. </cus:DialogContent.BottmBar>
  116. </cus:DialogContent>
  117. </UserControl>