1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <UserControl x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterPaperSettingsDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/" xmlns:cus="clr-namespace:PDF_Master.CustomControl" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- prism:ViewModelLocator.AutoWireViewModel="True">
- <prism:Dialog.WindowStyle>
- <Style TargetType="{x:Type Window}">
- <Setter Property="Title" Value="{Binding Title}" />
- <Setter Property="prism:Dialog.WindowStartupLocation" Value="CenterScreen" />
- <Setter Property="WindowStyle" Value="None" />
- <Setter Property="MaxHeight" Value="371"></Setter>
- <Setter Property="MaxWidth" Value="380"></Setter>
- <Setter Property="MinHeight" Value="371"></Setter>
- <Setter Property="MinWidth" Value="380"></Setter>
- </Style>
- </prism:Dialog.WindowStyle>
- <Grid Height="371" Width="380">
- <Grid.RowDefinitions>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="64"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <TextBlock Text="页面设置" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
- </Grid>
- <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,0.5,0,0.5" VerticalAlignment="Center" >
- <Grid Grid.Row="1" Height="268" Margin="16,0,0,0">
- <Grid.RowDefinitions>
- <RowDefinition Height="137"></RowDefinition>
- <RowDefinition Height="131"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Margin="0,16,0,0">
- <TextBlock Text="纸张" FontWeight="ExtraBlack" Width="56" Height="22" FontSize="14" HorizontalAlignment="Left"/>
- <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
- <TextBlock Text="大小: " VerticalAlignment="Center" FontSize="14" Width="42"></TextBlock>
- <ComboBox Name="PageMediaSizeNameCmb" Width="281" Height="32" Margin="16,0,0,0" ItemsSource="{Binding PageMediaSizeNameList}" SelectedIndex="{Binding PageMediaSizeIndex}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SetPaperSizeCommand}" CommandParameter="{Binding ElementName=PageMediaSizeNameCmb}"></i:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,9,0,0" Visibility="{Binding IsPageSizeStackPanelsVisible, Mode=OneWay}">
- <TextBox Margin="58,0,0,0" Height="32" Width="52" VerticalContentAlignment="Center" Text="{Binding CustomPaperSizeWidth}"></TextBox>
- <TextBlock Text="X" Width=" 9" Margin="11,0,11,0" VerticalAlignment="Center"></TextBlock>
- <TextBox Margin="0,0,0,0" Height="32" Width="52" VerticalContentAlignment="Center" Text="{Binding CustomPaperSizeHeight}"></TextBox>
- <TextBlock Text="mm" Margin="11,0,11,0" VerticalAlignment="Center"></TextBlock>
- </StackPanel>
- </StackPanel>
- <StackPanel Grid.Row="1" Margin="0,0,0,0">
- <TextBlock Text="页边距" FontWeight="ExtraBlack" Height="22" FontSize="14" HorizontalAlignment="Left"/>
- <StackPanel Orientation="Horizontal" Margin="0,11,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="上: " VerticalAlignment="Center" FontSize="14"></TextBlock>
- <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginTop, Mode=TwoWay}"></cus:NumericUpDown>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
- <TextBlock Text="下: " VerticalAlignment="Center" FontSize="14"></TextBlock>
- <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginBottom, Mode=TwoWay}"></cus:NumericUpDown>
- </StackPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,14,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="左: " VerticalAlignment="Center" FontSize="14"></TextBlock>
- <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginLeft, Mode=TwoWay}"></cus:NumericUpDown>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="71,0,0,0">
- <TextBlock Text="右: " VerticalAlignment="Center" FontSize="14"></TextBlock>
- <cus:NumericUpDown Margin="30,0,0,0" Height="32" Width=" 66" Text="{Binding MarginRight, Mode=TwoWay}"></cus:NumericUpDown>
- </StackPanel>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Border>
- <Grid Grid.Row="2">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
- <Button Width="98" Height="32" Content="取消" Margin="0,0,0,0" Command="{Binding CancelCommand}"></Button>
- <Button Width="98" Height="32" Content="确认" Margin="10,0,16,0" Command="{Binding ConfirmPaperSettingsCommand}"></Button>
- </StackPanel>
- </Grid>
- </Grid>
- </UserControl>
|