HomePagePrinterModSizeContent.xaml 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <UserControl
  2. x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterModSizeContent"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:cus="clr-namespace:PDF_Master.CustomControl"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:homepageprinter="clr-namespace:PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter"
  8. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  9. xmlns:prism="http://prismlibrary.com/"
  10. d:DataContext="{d:DesignInstance Type=homepageprinter:HomePagePrinterModSizeContentViewModel}"
  11. d:DesignHeight="184"
  12. d:DesignWidth="466"
  13. prism:ViewModelLocator.AutoWireViewModel="True"
  14. mc:Ignorable="d">
  15. <Grid>
  16. <Grid.RowDefinitions>
  17. <RowDefinition Height="120" />
  18. <RowDefinition />
  19. </Grid.RowDefinitions>
  20. <Border
  21. Grid.Row="0"
  22. Background="#F7F8FA"
  23. CornerRadius="4">
  24. <Grid Height="120" VerticalAlignment="Top">
  25. <Grid.RowDefinitions>
  26. <RowDefinition />
  27. <RowDefinition />
  28. <RowDefinition />
  29. </Grid.RowDefinitions>
  30. <Grid Grid.Row="0" Margin="8,8,0,0">
  31. <RadioButton
  32. Name="StatusAdaptiveRdo"
  33. VerticalContentAlignment="Center"
  34. Command="{Binding SetModSizeStatusCommand}"
  35. CommandParameter="{Binding ElementName=StatusAdaptiveRdo}"
  36. GroupName="ModSize"
  37. IsChecked="True">
  38. <TextBlock
  39. FontFamily="Segoe UI"
  40. FontSize="14"
  41. Text="Auto adapt" />
  42. </RadioButton>
  43. </Grid>
  44. <Grid Grid.Row="1" Margin="8,0">
  45. <RadioButton
  46. Name="StatusActuralRdo"
  47. VerticalContentAlignment="Center"
  48. Command="{Binding SetModSizeStatusCommand}"
  49. CommandParameter="{Binding ElementName=StatusActuralRdo}"
  50. GroupName="ModSize">
  51. <TextBlock
  52. FontFamily="Segoe UI"
  53. FontSize="14"
  54. Text="Actual size" />
  55. </RadioButton>
  56. </Grid>
  57. <WrapPanel
  58. Grid.Row="2"
  59. Height="40"
  60. Margin="8,0,0,0"
  61. VerticalAlignment="Center">
  62. <RadioButton
  63. Name="StatusCustomizedRdo"
  64. VerticalContentAlignment="Center"
  65. Command="{Binding SetModSizeStatusCommand}"
  66. CommandParameter="{Binding ElementName=StatusCustomizedRdo}"
  67. GroupName="ModSize">
  68. <TextBlock
  69. FontFamily="Segoe UI"
  70. FontSize="14"
  71. Text="Custom scale:" />
  72. </RadioButton>
  73. <cus:NumericUpDown
  74. x:Name="CustomRatioUpDown"
  75. Width="90"
  76. Height="28"
  77. Margin="15,0,0,0"
  78. IsEnabled="{Binding ElementName=StatusCustomizedRdo, Path=IsChecked}"
  79. Loaded="CustomRatioUpDown_Loaded"
  80. Maximum="200"
  81. Minimum="20"
  82. Text="{Binding DisplayRatio, Mode=TwoWay}" />
  83. </WrapPanel>
  84. </Grid>
  85. </Border>
  86. <Grid Grid.Row="1" Margin="0,8,0,0">
  87. <Border
  88. Grid.Row="0"
  89. Background="#F7F8FA"
  90. CornerRadius="4">
  91. <StackPanel Orientation="Vertical">
  92. <CheckBox
  93. Name="DuplexChk"
  94. Margin="9,12"
  95. Command="{Binding UnlockDuplexCommand}"
  96. CommandParameter="{Binding ElementName=DuplexChk}">
  97. <TextBlock Text="Duplex Printing" />
  98. </CheckBox>
  99. <StackPanel
  100. Margin="0,0,0,15"
  101. IsEnabled="{Binding ElementName=DuplexChk, Path=IsChecked}"
  102. Orientation="Horizontal">
  103. <RadioButton
  104. Name="DuplexModLongEdgeRdo"
  105. Margin="12,0,17,0"
  106. Command="{Binding ChangeDuplexModCommand}"
  107. CommandParameter="{Binding ElementName=DuplexModLongEdgeRdo}"
  108. IsChecked="{Binding IsDuplexModLongEdge}">
  109. <TextBlock Text="Flip On Long Edge" />
  110. </RadioButton>
  111. <RadioButton
  112. Name="DuplexModShortEdgeRdo"
  113. Command="{Binding ChangeDuplexModCommand}"
  114. CommandParameter="{Binding ElementName=DuplexModShortEdgeRdo}"
  115. IsChecked="{Binding IsDuplexModShortEdge}">
  116. <TextBlock Text="Flip On Short Edge" />
  117. </RadioButton>
  118. </StackPanel>
  119. </StackPanel>
  120. </Border>
  121. </Grid>
  122. </Grid>
  123. </UserControl>