HomePagePrinterPaperSettingsDialog.xaml 6.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterPaperSettingsDialog"
  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/" xmlns:cus="clr-namespace:PDF_Master.CustomControl" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
  5. prism:ViewModelLocator.AutoWireViewModel="True">
  6. <prism:Dialog.WindowStyle>
  7. <Style TargetType="{x:Type Window}">
  8. <Setter Property="Title" Value="{Binding Title}" />
  9. <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
  10. <Setter Property="WindowStyle" Value="None" />
  11. <Setter Property="MaxHeight" Value="371"></Setter>
  12. <Setter Property="MaxWidth" Value="380"></Setter>
  13. <Setter Property="MinHeight" Value="371"></Setter>
  14. <Setter Property="MinWidth" Value="380"></Setter>
  15. </Style>
  16. </prism:Dialog.WindowStyle>
  17. <Grid Height="371" Width="380">
  18. <Grid.RowDefinitions>
  19. <RowDefinition Height="50"></RowDefinition>
  20. <RowDefinition Height="*"></RowDefinition>
  21. <RowDefinition Height="64"></RowDefinition>
  22. </Grid.RowDefinitions>
  23. <Grid Grid.Row="0">
  24. <TextBlock Text="页面设置" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
  25. </Grid>
  26. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,0.5,0,0.5" VerticalAlignment="Center" >
  27. <Grid Grid.Row="1" Height="268" Margin="16,0,0,0">
  28. <Grid.RowDefinitions>
  29. <RowDefinition Height="137"></RowDefinition>
  30. <RowDefinition Height="131"></RowDefinition>
  31. </Grid.RowDefinitions>
  32. <StackPanel Grid.Row="0" Margin="0,16,0,0">
  33. <TextBlock Text="纸张" FontWeight="ExtraBlack" Width="56" Height="22" FontSize="14" HorizontalAlignment="Left"/>
  34. <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
  35. <TextBlock Text="大小: " VerticalAlignment="Center" FontSize="14" Width="42"></TextBlock>
  36. <ComboBox Name="PageMediaSizeNameCmb" Width="281" Height="32" Margin="16,0,0,0" ItemsSource="{Binding PageMediaSizeNameList}" SelectedIndex="{Binding PageMediaSizeIndex}">
  37. <i:Interaction.Triggers>
  38. <i:EventTrigger EventName="SelectionChanged">
  39. <i:InvokeCommandAction Command="{Binding SetPaperSizeCommand}" CommandParameter="{Binding ElementName=PageMediaSizeNameCmb}"></i:InvokeCommandAction>
  40. </i:EventTrigger>
  41. </i:Interaction.Triggers>
  42. </ComboBox>
  43. </StackPanel>
  44. <StackPanel Orientation="Horizontal" Margin="0,9,0,0" Visibility="{Binding IsPageSizeStackPanelsVisible, Mode=OneWay}">
  45. <TextBox Margin="58,0,0,0" Height="32" Width="52" VerticalContentAlignment="Center" Text="{Binding CustomPaperSizeWidth}"></TextBox>
  46. <TextBlock Text="X" Width=" 9" Margin="11,0,11,0" VerticalAlignment="Center"></TextBlock>
  47. <TextBox Margin="0,0,0,0" Height="32" Width="52" VerticalContentAlignment="Center" Text="{Binding CustomPaperSizeHeight}"></TextBox>
  48. <TextBlock Text="mm" Margin="11,0,11,0" VerticalAlignment="Center"></TextBlock>
  49. </StackPanel>
  50. </StackPanel>
  51. <StackPanel Grid.Row="1" Margin="0,0,0,0">
  52. <TextBlock Text="页边距" FontWeight="ExtraBlack" Height="22" FontSize="14" HorizontalAlignment="Left"/>
  53. <StackPanel Orientation="Horizontal" Margin="0,11,0,0">
  54. <StackPanel Orientation="Horizontal">
  55. <TextBlock Text="上: " VerticalAlignment="Center" FontSize="14"></TextBlock>
  56. <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginTop, Mode=TwoWay}"></cus:NumericUpDown>
  57. </StackPanel>
  58. <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
  59. <TextBlock Text="下: " VerticalAlignment="Center" FontSize="14"></TextBlock>
  60. <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginBottom, Mode=TwoWay}"></cus:NumericUpDown>
  61. </StackPanel>
  62. </StackPanel>
  63. <StackPanel Orientation="Horizontal" Margin="0,14,0,0">
  64. <StackPanel Orientation="Horizontal">
  65. <TextBlock Text="左: " VerticalAlignment="Center" FontSize="14"></TextBlock>
  66. <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginLeft, Mode=TwoWay}"></cus:NumericUpDown>
  67. </StackPanel>
  68. <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
  69. <TextBlock Text="右: " VerticalAlignment="Center" FontSize="14"></TextBlock>
  70. <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginRight, Mode=TwoWay}"></cus:NumericUpDown>
  71. </StackPanel>
  72. </StackPanel>
  73. </StackPanel>
  74. </Grid>
  75. </Border>
  76. <Grid Grid.Row="2">
  77. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  78. <Button Width="98" Height="32" Content="取消" Margin="0,0,0,0" Command="{Binding CancelCommand}"></Button>
  79. <Button Width="98" Height="32" Content="确认" Margin="10,0,16,0" Command="{Binding ConfirmPaperSettingsCommand}"></Button>
  80. </StackPanel>
  81. </Grid>
  82. </Grid>
  83. </UserControl>