HomePagePrinterModPosterContent.xaml 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterModPosterContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:prism="http://prismlibrary.com/"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:cus="clr-namespace:PDF_Office.CustomControl" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  7. mc:Ignorable="d"
  8. d:DesignHeight="180"
  9. d:DesignWidth="466"
  10. prism:ViewModelLocator.AutoWireViewModel="True">
  11. <Border Background="#F7F8FA" CornerRadius="4" Height="188">
  12. <Grid VerticalAlignment="Top">
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="30*"></RowDefinition>
  15. <RowDefinition Height="40*"></RowDefinition>
  16. <RowDefinition Height="40*"></RowDefinition>
  17. <RowDefinition Height="30*"></RowDefinition>
  18. <RowDefinition Height="40*"></RowDefinition>
  19. </Grid.RowDefinitions>
  20. <Grid Grid.Row="0" HorizontalAlignment="Left" Margin="0,8,0,0">
  21. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  22. <RadioButton Name="StatusTileRdo" Margin="8,0,25,0" FontSize="14" IsChecked="True" GroupName="ModPoster" Command="{Binding SetModPosterStatusCommand}" CommandParameter="{Binding ElementName=StatusTileRdo}">
  23. <TextBlock Text="Tile" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  24. </RadioButton>
  25. <RadioButton Name="StatusSplitRdo" FontSize="14" GroupName="ModPoster" Command="{Binding SetModPosterStatusCommand}" CommandParameter="{Binding ElementName=StatusSplitRdo}">
  26. <TextBlock Text="Split" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  27. </RadioButton>
  28. </StackPanel>
  29. </Grid>
  30. <Grid Grid.Row="1">
  31. <StackPanel Orientation="Horizontal" Visibility="{Binding PageRangeSettingVisibility, Mode=TwoWay}" Margin="8,8,0,0">
  32. <TextBlock Text="Page range:" VerticalAlignment="Center" FontSize="14" Width="80"></TextBlock>
  33. <cus:NumericUpDown x:Name="CustomRatioUpDown" Loaded="CustomRatioUpDown_Loaded" Width="90" Height="32" Margin="16,0,16,0" Text="{Binding TileRatio, Mode=TwoWay}" IsEnabled="{Binding ElementName=CustomRatioBtn, Path=IsChecked}"></cus:NumericUpDown>
  34. <TextBlock Text="%" VerticalAlignment="Center" FontSize="14"></TextBlock>
  35. </StackPanel>
  36. <StackPanel Orientation="Horizontal" Visibility="{Binding PagesPerSheetVisibility , Mode=TwoWay}" Margin="8,8,0,0">
  37. <TextBlock Text="Pages per sheet:" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="14" ></TextBlock>
  38. <ComboBox Name="PageSheetCmb" Height="32" Width="196" Margin="16,0,16,0" ItemsSource="{Binding PageSheetList}" SelectedIndex="{Binding PageSheetIndex}">
  39. <i:Interaction.Triggers>
  40. <i:EventTrigger>
  41. <i:InvokeCommandAction Command="{Binding SetSheetCommand}" CommandParameter="{Binding ElementName=PageSheetCbx}"></i:InvokeCommandAction>
  42. </i:EventTrigger>
  43. </i:Interaction.Triggers>
  44. </ComboBox>
  45. <StackPanel Orientation="Horizontal" IsEnabled="{Binding EnableCustomSheet, Mode=TwoWay}">
  46. <TextBox Height="32" Width="48" Text="{Binding HorizontalSheetNumber}">
  47. <TextBox.InputBindings>
  48. <KeyBinding Command="{Binding SetCustomSheetCommand}" Key="Return"></KeyBinding>
  49. </TextBox.InputBindings>
  50. </TextBox>
  51. <TextBlock Text="x" VerticalAlignment="Center" Margin="8,0,8,0"></TextBlock>
  52. <TextBox Height="32" Width="48" Text="{Binding VerticalSheetNumber}">
  53. <TextBox.InputBindings>
  54. <KeyBinding Command="{Binding SetCustomSheetCommand}" Key="Return"></KeyBinding>
  55. </TextBox.InputBindings>
  56. </TextBox>
  57. </StackPanel>
  58. </StackPanel>
  59. </Grid>
  60. <Grid Grid.Row="2" Margin="8,8,0,0">
  61. <StackPanel Orientation="Horizontal" >
  62. <TextBlock Text="Overlap:" VerticalAlignment="Center" FontSize="14" Width="80"></TextBlock>
  63. <TextBox Height="32" Width="88" Margin="16,0,16,0" Text="{Binding OverlapNumber,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
  64. <TextBox.InputBindings>
  65. <KeyBinding Command="{Binding SetOverlapCommand}" Key="Return"></KeyBinding>
  66. </TextBox.InputBindings>
  67. </TextBox>
  68. <TextBlock Text="mm" VerticalAlignment="Center" FontSize="14"></TextBlock>
  69. </StackPanel>
  70. </Grid>
  71. <Grid Grid.Row="3" Margin="8,8,0,0">
  72. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  73. <CheckBox Name="SetCutMarksChk" Margin="0,0,11,0" Command="{Binding SetCutMarksCommand}" CommandParameter="{Binding ElementName=SetCutMarksChk}"></CheckBox>
  74. <TextBlock Text="Cut marks" FontSize="14"></TextBlock>
  75. </StackPanel>
  76. </Grid>
  77. <Grid Grid.Row="4" VerticalAlignment="Center" Margin="8,8,0,0">
  78. <StackPanel Orientation="Horizontal">
  79. <CheckBox Name="SetLabelChk" Margin="0,0,11,0" VerticalAlignment="Center" Command="{Binding SetLabelCommand}" CommandParameter="{Binding ElementName=SetLabelChk}"></CheckBox>
  80. <TextBlock Text="Label" VerticalAlignment="Center" Margin="0,0,16,0" FontSize="14"></TextBlock>
  81. <TextBox Height="32" Width="361" Text="{Binding LabelString, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsEnabled="{Binding ElementName=SetLabelChk, Path=IsChecked}" IsReadOnly="True">
  82. <TextBox.Resources>
  83. <VisualBrush x:Key="HelpBrush" TileMode ="None" Opacity="0.3" Stretch="None" AlignmentX="Left">
  84. <VisualBrush.Visual>
  85. <TextBlock Text="{Binding DefaultLabel, Mode=OneWay}"></TextBlock>
  86. </VisualBrush.Visual>
  87. </VisualBrush>
  88. </TextBox.Resources>
  89. <TextBox.Style>
  90. <Style TargetType="TextBox">
  91. <Style.Triggers>
  92. <Trigger Property="Text" Value="{x:Null}">
  93. <Setter Property="Background" Value="{StaticResource HelpBrush}"></Setter>
  94. </Trigger>
  95. <Trigger Property="Text" Value="">
  96. <Setter Property="Background" Value="{StaticResource HelpBrush}"></Setter>
  97. </Trigger>
  98. </Style.Triggers>
  99. </Style>
  100. </TextBox.Style>
  101. </TextBox>
  102. </StackPanel>
  103. </Grid>
  104. </Grid>
  105. </Border>
  106. </UserControl>