HomePagePrinterModPosterContent.xaml 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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" xmlns:homepageprinter="clr-namespace:PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter" d:DataContext="{d:DesignInstance Type=homepageprinter:HomePagePrinterModPosterContentViewModel}"
  7. mc:Ignorable="d"
  8. d:DesignHeight="180"
  9. d:DesignWidth="466"
  10. prism:ViewModelLocator.AutoWireViewModel="True">
  11. <UserControl.Resources>
  12. <Style x:Key="LabelTxtStyle" TargetType="TextBox">
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate>
  16. <Grid Height="{TemplateBinding Height}" Width="{TemplateBinding Width}">
  17. <Border BorderBrush="{StaticResource color.field.border.dis}" Background="{StaticResource color.field.bg.dis}" CornerRadius="4">
  18. <Grid>
  19. <TextBlock Text="{Binding DefaultLabel, Mode=OneWay}" Grid.Column="1" VerticalAlignment="Center" Foreground="#BBB"
  20. Name="markText" Visibility="Visible" FontSize="14" Margin="8,0,0,0" FontFamily="Segoe UI"/>
  21. </Grid>
  22. </Border>
  23. </Grid>
  24. </ControlTemplate>
  25. </Setter.Value>
  26. </Setter>
  27. </Style>
  28. </UserControl.Resources>
  29. <Border Background="#F7F8FA" CornerRadius="4" Height="188">
  30. <Grid VerticalAlignment="Top">
  31. <Grid.RowDefinitions>
  32. <RowDefinition Height="30*"></RowDefinition>
  33. <RowDefinition Height="40*"></RowDefinition>
  34. <RowDefinition Height="40*"></RowDefinition>
  35. <RowDefinition Height="30*"></RowDefinition>
  36. <RowDefinition Height="40*"></RowDefinition>
  37. </Grid.RowDefinitions>
  38. <Grid Grid.Row="0" HorizontalAlignment="Left" Margin="0,8,0,0">
  39. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  40. <RadioButton Name="StatusTileRdo" Margin="8,0,25,0" FontSize="14" IsChecked="True" GroupName="ModPoster" Command="{Binding SetModPosterStatusCommand}" CommandParameter="{Binding ElementName=StatusTileRdo}">
  41. <TextBlock Text="Tile" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  42. </RadioButton>
  43. <RadioButton Name="StatusSplitRdo" FontSize="14" GroupName="ModPoster" Command="{Binding SetModPosterStatusCommand}" CommandParameter="{Binding ElementName=StatusSplitRdo}">
  44. <TextBlock Text="Split" FontFamily="Segoe UI" FontSize="14"></TextBlock>
  45. </RadioButton>
  46. </StackPanel>
  47. </Grid>
  48. <Grid Grid.Row="1">
  49. <StackPanel Orientation="Horizontal" Visibility="{Binding PageRangeSettingVisibility, Mode=TwoWay}" Margin="8,8,0,0">
  50. <TextBlock Text="Page range:" VerticalAlignment="Center" FontSize="14" Width="80"></TextBlock>
  51. <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}" Minimum="1" Maximum="400"></cus:NumericUpDown>
  52. <TextBlock Text="%" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI" Foreground="{StaticResource color.sys.text.neutral.lv3}"></TextBlock>
  53. </StackPanel>
  54. <StackPanel Orientation="Horizontal" Visibility="{Binding PagesPerSheetVisibility , Mode=TwoWay}" Margin="8,8,0,0">
  55. <TextBlock Text="Pages per sheet:" VerticalAlignment="Center" FontFamily="Segoe UI" FontSize="14" ></TextBlock>
  56. <ComboBox Name="PageSheetCmb" Height="32" Width="196" Margin="16,0,16,0" ItemsSource="{Binding PageSheetList}" SelectedIndex="{Binding PageSheetIndex}">
  57. <i:Interaction.Triggers>
  58. <i:EventTrigger>
  59. <i:InvokeCommandAction Command="{Binding SetSheetCommand}" CommandParameter="{Binding ElementName=PageSheetCbx}"></i:InvokeCommandAction>
  60. </i:EventTrigger>
  61. </i:Interaction.Triggers>
  62. </ComboBox>
  63. <StackPanel Orientation="Horizontal" IsEnabled="{Binding EnableCustomSheet, Mode=TwoWay}">
  64. <TextBox Style="{StaticResource Print_normalTxtStyle}" Height="32" Width="48" VerticalContentAlignment="Center" Text="{Binding HorizontalSheetNumber,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
  65. <TextBox.InputBindings>
  66. <KeyBinding Command="{Binding SetCustomSheetCommand}" Key="Return"></KeyBinding>
  67. </TextBox.InputBindings>
  68. </TextBox>
  69. <TextBlock Text="x" VerticalAlignment="Center" Margin="8,0,8,0"></TextBlock>
  70. <TextBox Style="{StaticResource Print_normalTxtStyle}" Height="32" Width="48" VerticalContentAlignment="Center" Text="{Binding VerticalSheetNumber,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
  71. <TextBox.InputBindings>
  72. <KeyBinding Command="{Binding SetCustomSheetCommand}" Key="Return"></KeyBinding>
  73. </TextBox.InputBindings>
  74. </TextBox>
  75. </StackPanel>
  76. </StackPanel>
  77. </Grid>
  78. <Grid Grid.Row="2" Margin="8,8,0,0">
  79. <StackPanel Orientation="Horizontal" >
  80. <TextBlock Text="Overlap:" VerticalAlignment="Center" FontSize="14" Width="80"></TextBlock>
  81. <TextBox Style="{StaticResource Print_normalTxtStyle}" VerticalContentAlignment="Center" Height="32" Width="88" Margin="16,0,16,0" Text="{Binding OverlapNumber,UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}">
  82. <TextBox.InputBindings>
  83. <KeyBinding Command="{Binding SetOverlapCommand}" Key="Return"></KeyBinding>
  84. </TextBox.InputBindings>
  85. </TextBox>
  86. <TextBlock Text="mm" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI" Foreground="{StaticResource color.sys.text.neutral.lv3}"></TextBlock>
  87. </StackPanel>
  88. </Grid>
  89. <Grid Grid.Row="3" Margin="8,8,0,0">
  90. <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
  91. <CheckBox Name="SetCutMarksChk" Margin="0,0,11,0" Command="{Binding SetCutMarksCommand}" CommandParameter="{Binding ElementName=SetCutMarksChk}"></CheckBox>
  92. <TextBlock Text="Cut marks" FontSize="14"></TextBlock>
  93. </StackPanel>
  94. </Grid>
  95. <Grid Grid.Row="4" VerticalAlignment="Center" Margin="8,8,0,0">
  96. <StackPanel Orientation="Horizontal">
  97. <CheckBox Name="SetLabelChk" Margin="0,0,11,0" VerticalAlignment="Center" Command="{Binding SetLabelCommand}" CommandParameter="{Binding ElementName=SetLabelChk}"></CheckBox>
  98. <TextBlock Text="Label" VerticalAlignment="Center" Margin="0,0,16,0" FontSize="14"></TextBlock>
  99. <TextBox Style="{StaticResource LabelTxtStyle}" Height="32" Width="361" Text="{Binding LabelString, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsEnabled="{Binding ElementName=SetLabelChk, Path=IsChecked}" IsReadOnly="True"></TextBox>
  100. </StackPanel>
  101. </Grid>
  102. </Grid>
  103. </Border>
  104. </UserControl>