HomePagePrinterPageSetDialog.xaml 5.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterPageSetDialog"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:cus="clr-namespace:PDF_Office.CustomControl"
  7. xmlns:prism="http://prismlibrary.com/" xmlns:homepageprinter="clr-namespace:PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter" d:DataContext="{d:DesignInstance Type=homepageprinter:HomePagePrinterPageSetDialogViewModel}"
  8. prism:ViewModelLocator.AutoWireViewModel="True"
  9. d:DesignHeight="380"
  10. d:DesignWidth="371"
  11. mc:Ignorable="d">
  12. <Grid Height="380" Width="371" Margin="16,0,16,0">
  13. <Grid.RowDefinitions>
  14. <RowDefinition Height="48"></RowDefinition>
  15. <RowDefinition Height="*"></RowDefinition>
  16. <RowDefinition Height="64"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <TextBlock Grid.Row="0" Text="页面设置" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
  19. <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center" Height="235">
  20. <Grid>
  21. <Grid.RowDefinitions>
  22. <RowDefinition Height="1*"></RowDefinition>
  23. <RowDefinition Height="1*"></RowDefinition>
  24. </Grid.RowDefinitions>
  25. <StackPanel Grid.Row="0">
  26. <TextBlock Text="纸张" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
  27. <StackPanel Orientation="Horizontal">
  28. <TextBlock Text="大小: " VerticalAlignment="Center" Width="42"></TextBlock>
  29. <ComboBox Width="281" Height="32" Margin="16,0,0,0" ItemsSource="{Binding PaperSizeNameList}" SelectedIndex="{Binding PaperSizeIndex}" SelectionChanged="ComboBox_SelectionChanged"></ComboBox>
  30. </StackPanel>
  31. <StackPanel Orientation="Horizontal" Margin="0,9,0,0" Visibility="{Binding IsPageSizeStackPanelsVisible, Mode=OneWay}">
  32. <TextBox Margin="58,0,0,0" Height="32" Width="52" VerticalContentAlignment="Center" TextChanged="TextBox_TextChanged" Text="{Binding PaperSizeWidth, Mode=TwoWay}"></TextBox>
  33. <TextBlock Text="X" Width=" 9" Margin="11,0,11,0" VerticalAlignment="Center"></TextBlock>
  34. <TextBox Margin="0,0,0,0" Height="32" Width="52" VerticalContentAlignment="Center" Text="{Binding PaperSizeHeight, Mode=TwoWay}"></TextBox>
  35. <TextBlock Text="mm" Margin="11,0,11,0" VerticalAlignment="Center"></TextBlock>
  36. </StackPanel>
  37. </StackPanel>
  38. <StackPanel Grid.Row="1" Margin="0,0,0,0">
  39. <TextBlock Text="页边距" FontWeight="ExtraBlack" Width="56" Height="22" HorizontalAlignment="Left"/>
  40. <StackPanel Orientation="Horizontal">
  41. <StackPanel Orientation="Horizontal">
  42. <TextBlock Text="上: " VerticalAlignment="Center"></TextBlock>
  43. <cus:NumericUpDown Margin="30,0,0,0" Text="{Binding TopMargin, Mode=TwoWay}" Height="32" Width=" 66"></cus:NumericUpDown>
  44. </StackPanel>
  45. <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
  46. <TextBlock Text="下: " VerticalAlignment="Center" ></TextBlock>
  47. <cus:NumericUpDown Margin="30,0,0,0" Text="{Binding BottomMargin, Mode=TwoWay}" Height="32" Width=" 66"></cus:NumericUpDown>
  48. </StackPanel>
  49. </StackPanel>
  50. <StackPanel Orientation="Horizontal" Margin="0,14,0,0">
  51. <StackPanel Orientation="Horizontal">
  52. <TextBlock Text="左: " VerticalAlignment="Center"></TextBlock>
  53. <cus:NumericUpDown Margin="30,0,0,0" Text="{Binding LeftMargin, Mode=TwoWay}" Height="32" Width=" 66"></cus:NumericUpDown>
  54. </StackPanel>
  55. <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
  56. <TextBlock Text="右: " VerticalAlignment="Center"></TextBlock>
  57. <cus:NumericUpDown Margin="30,0,0,0" Text="{Binding RightMargin, Mode=TwoWay}" Height="32" Width=" 66"></cus:NumericUpDown>
  58. </StackPanel>
  59. </StackPanel>
  60. </StackPanel>
  61. </Grid>
  62. </Border>
  63. <Grid Grid.Row="2">
  64. <StackPanel Orientation="Horizontal" Margin="0,16,32,16" HorizontalAlignment="Right">
  65. <Button Content="取消" Height="32" Width="98" Margin="0,0,10,0" Command="{Binding CancelSetPageSizeCommand}"></Button>
  66. <Button Content="确认" Height="32" Width="98" Command="{Binding ConfirmSetPageSizeCommand}"></Button>
  67. </StackPanel>
  68. </Grid>
  69. </Grid>
  70. </UserControl>