123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463 |
- <UserControl
- x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:cus="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:homepageprinter="clr-namespace:PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:prism="http://prismlibrary.com/"
- prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
- prism:ViewModelLocator.AutoWireViewModel="True"
- IsEnabled="{Binding IsHitVisible}">
- <UserControl.Resources>
- <Style x:Key="PageSettingsBtnStyle" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid>
- <Border
- x:Name="PageSettingsBtnBorder"
- Background="Transparent"
- BorderBrush="{StaticResource color.btn.sec.border-color}"
- BorderThickness="1"
- CornerRadius="4">
- <Grid>
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{TemplateBinding Content}" />
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="PageSettingsBtnBorder" Property="Background" Value="{StaticResource color.btn.sec.bg.hov}" />
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter TargetName="PageSettingsBtnBorder" Property="Background" Value="{StaticResource color.btn.sec.bg.act}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="PrintModRdoStyle" TargetType="RadioButton">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Border
- x:Name="PrintModRdo"
- VerticalAlignment="Center"
- Background="{StaticResource color.btn.sec.bg.norm}"
- BorderBrush="{StaticResource color.btn.sec.border-color}"
- BorderThickness="1"
- CornerRadius="4">
- <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
- <TextBlock
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- FontSize="14"
- Foreground="{StaticResource color.btn.sec.text.def}"
- Text="{TemplateBinding Content}" />
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="PrintModRdo" Property="Background" Value="{StaticResource color.btn.sec.bg.hov}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="False">
- <Setter TargetName="PrintModRdo" Property="Background" Value="{StaticResource color.btn.sec.bg.norm}" />
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter TargetName="PrintModRdo" Property="Background" Value="{StaticResource color.btn.sec.bg.act}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="HelpTipStyle" TargetType="Label" />
- </UserControl.Resources>
- <cus:DialogContent Header="{Binding T_Title}">
- <cus:DialogContent.Content>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="238" />
- <ColumnDefinition Width="492" />
- </Grid.ColumnDefinitions>
- <Grid
- Grid.Column="0"
- Margin="16,0,10,0"
- VerticalAlignment="Top">
- <ContentControl prism:RegionManager.RegionName="{Binding HomePagePrinterDocumentRegionName}" Visibility="Visible" />
- </Grid>
- <Grid Grid.Column="1">
- <Grid>
- <Grid.RowDefinitions>
- <!-- 310 - 88 -->
- <RowDefinition Height="222" />
- <RowDefinition Height="216" />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="0,0,0,0">
- <Grid.RowDefinitions>
- <!-- 61 、27 -->
- <RowDefinition Height="72" />
- <RowDefinition Height="150" />
- <RowDefinition Height="0" />
- <RowDefinition Height="0" />
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Height="22"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{Binding T_Printer}" />
- <ComboBox
- Name="PrinterNameComboBox"
- Width="273"
- Height="32"
- Margin="16,0,16,0"
- ItemsSource="{Binding PrinterNameList}"
- SelectedIndex="{Binding PrinterSelectedIndex}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SelectPrinterCommand}" CommandParameter="{Binding ElementName=PrinterNameComboBox}" />
- </i:EventTrigger>
- <i:EventTrigger EventName="LostFocus" />
- </i:Interaction.Triggers>
- </ComboBox>
- <Button
- Name="PageSettingsBtn"
- Width="116"
- Height="32"
- Command="{Binding SetPaperCommand}"
- Content="{Binding T_PageSettings}"
- Style="{StaticResource PageSettingsBtnStyle}" />
- </StackPanel>
- <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Height="22"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{Binding T_Copies}" />
- <cus:NumericUpDown
- Width="132"
- Height="32"
- Margin="16,0,0,0"
- Minimum="1"
- Text="{Binding CopiesNumber, Mode=TwoWay}" />
- </StackPanel>
- <CheckBox
- Name="GrayscaleChk"
- Margin="17,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding SetGrayscaleCommand}"
- CommandParameter="{Binding ElementName=GrayscaleChk}">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="14"
- Foreground="#252629"
- Text="{Binding T_BlackAndWhite}" />
- </CheckBox>
- </StackPanel>
- </StackPanel>
- <StackPanel
- Grid.Row="1"
- Margin="0,18,0,0"
- Orientation="Vertical">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Foreground="#616469"
- Text="{Binding T_PrintSettings}" />
- <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- Width="82"
- Height="22"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="Page range" />
- <cus:WritableComboBox
- x:Name="PageRangeComboBox"
- Width="132"
- Height="32"
- Margin="16,0,0,0"
- Loaded="PageRangeComboBox_Loaded"
- MaxPageRange="{Binding MaxPageRange, Mode=TwoWay}"
- SelectedIndex="{Binding PageRangeSelectIndex, Mode=TwoWay}"
- Text="{Binding CustomRangeString, Mode=TwoWay}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SetPageRangeSelectionIndexCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
- </i:EventTrigger>
- <i:EventTrigger EventName="TextChanged">
- <i:InvokeCommandAction Command="{Binding PageTextChangedCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
- </i:EventTrigger>
- <i:KeyTrigger Key="Return" FiredOn="KeyDown">
- <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}" />
- </i:KeyTrigger>
- </i:Interaction.Triggers>
- </cus:WritableComboBox>
- </StackPanel>
- <StackPanel Margin="20,0,0,0" Orientation="Horizontal">
- <TextBlock
- Height="22"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{Binding T_Orientation}" />
- <ComboBox
- Name="PrintOrientationCmb"
- Width="145"
- Height="32"
- Margin="16,0,0,0"
- ItemsSource="{Binding PrintOrientationList}"
- SelectedIndex="{Binding PrintOrientationIndex}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SetPrintOritationCommand}" CommandParameter="{Binding ElementName=PrintOrientationCmb}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- </StackPanel>
- </StackPanel>
- <StackPanel Margin="0,8,0,0" Orientation="Horizontal">
- <TextBlock
- Width="82"
- Height="22"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{Binding T_PrintContent}" />
- <ComboBox
- Name="PrintContentCbx"
- Width="377"
- Height="32"
- Margin="16,0,16,0"
- ItemsSource="{Binding PrintContentList}"
- SelectedIndex="{Binding PrintContentIndex}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SetPrintContentCommand}" CommandParameter="{Binding ElementName=PrintContentCbx}" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- </StackPanel>
- <StackPanel Margin="0,12,0,0" Orientation="Horizontal">
- <CheckBox
- x:Name="ReversePageCbx"
- VerticalAlignment="Center"
- Command="{Binding SetReversePageCommand}"
- CommandParameter="{Binding ElementName=ReversePageCbx}">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="14"
- Text="{Binding T_ReversePages}" />
- </CheckBox>
- <CheckBox
- x:Name="PrintBorderCbx"
- Margin="25,0,0,0"
- VerticalAlignment="Center"
- Command="{Binding SetPrintBorderCommand}"
- CommandParameter="{Binding ElementName=PrintBorderCbx}"
- Visibility="{Binding PrintPageBorderVisibility}">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="14"
- Text="Print page border" />
- </CheckBox>
- </StackPanel>
- </StackPanel>
- <!-- TODO: Visibility解锁多功能打印 -->
- <StackPanel
- Grid.Row="2"
- Grid.RowSpan="2"
- Margin="0,18,0,0"
- Orientation="Vertical"
- Visibility="Collapsed">
- <StackPanel Orientation="Horizontal">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Foreground="#616469"
- Text="Page Sizing & Handling" />
- <Label Margin="9,0,0,0" Padding="0,0,0,0">
- <Grid>
- <Ellipse
- Width="16"
- Height="16"
- Fill="white"
- Stroke="#CED0D4" />
- <Path
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M2.29102 6.36328H3.65039V6.02344C3.65039 5.4375 3.86719 5.13281 4.63477 4.6875C5.43164 4.21289 5.87695 3.58594 5.87695 2.69531V2.68359C5.87695 1.40039 4.80469 0.474609 3.19922 0.474609C1.45898 0.474609 0.503906 1.48242 0.462891 2.85352V2.86523L1.82812 2.85938L1.83984 2.85352C1.88086 2.13281 2.36719 1.66992 3.12305 1.66992C3.86133 1.66992 4.35352 2.12109 4.35352 2.73633V2.74805C4.35352 3.32227 4.10742 3.63867 3.38086 4.07812C2.57227 4.55273 2.23242 5.08008 2.28516 5.94727L2.29102 6.36328ZM3.03516 9.14648C3.63281 9.14648 4.00781 8.7832 4.00781 8.22656C4.00781 7.66406 3.63281 7.30078 3.03516 7.30078C2.44922 7.30078 2.0625 7.66406 2.0625 8.22656C2.0625 8.7832 2.44922 9.14648 3.03516 9.14648Z"
- Fill="#94989C" />
- </Grid>
- <Label.ToolTip>
- <ToolTip Width="350" Background="{StaticResource color.sys.layout.dark.bg}">
- <StackPanel Margin="16,8">
- <TextBlock
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text="Page Sizing and Handling Information"
- TextWrapping="Wrap" />
- <StackPanel Orientation="Vertical">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- FontWeight="Bold"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text=" · " />
- <TextBlock
- Grid.Column="1"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text="Size prints each PDF page on a single sheet of paper. "
- TextWrapping="Wrap" />
- </Grid>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- FontWeight="Bold"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text=" · " />
- <TextBlock
- Grid.Column="1"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text="Poster prints a PDF page across multiple sheets to form a mosaic. "
- TextWrapping="Wrap" />
- </Grid>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- FontWeight="Bold"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text=" · " />
- <TextBlock
- Grid.Column="1"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text="Multiple prints 2 or more PDF pages per sheet."
- TextWrapping="Wrap" />
- </Grid>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
- <TextBlock
- FontWeight="Bold"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text=" · " />
- <TextBlock
- Grid.Column="1"
- Foreground="{StaticResource color.sys.text.anti.norm}"
- Text="Booklet prints brochures and other publications that will be folded and stapled or bound together."
- TextWrapping="Wrap" />
- </Grid>
- </StackPanel>
- </StackPanel>
- </ToolTip>
- </Label.ToolTip>
- </Label>
- </StackPanel>
- <StackPanel Margin="0,10,0,0" Orientation="Horizontal">
- <RadioButton
- x:Name="ModSizeRdo"
- Width="111"
- Height="32"
- Background="WhiteSmoke"
- Command="{Binding ChangePrintModCommand}"
- CommandParameter="{Binding ElementName=ModSizeRdo}"
- Content="Size"
- IsChecked="True"
- Style="{StaticResource PrintModRdoStyle}" />
- <RadioButton
- Name="ModPosterRdo"
- Width="111"
- Height="32"
- Margin="8,0,8,0"
- Background="WhiteSmoke"
- Command="{Binding ChangePrintModCommand}"
- CommandParameter="{Binding ElementName=ModPosterRdo}"
- Content="Poster"
- Style="{StaticResource PrintModRdoStyle}" />
- <RadioButton
- Name="ModMultipleRdo"
- Width="111"
- Height="32"
- Margin="0,0,8,0"
- Background="WhiteSmoke"
- Command="{Binding ChangePrintModCommand}"
- CommandParameter="{Binding ElementName=ModMultipleRdo}"
- Content="Multiple"
- Style="{StaticResource PrintModRdoStyle}" />
- <RadioButton
- Name="ModBookletRdo"
- Width="111"
- Height="32"
- Margin="0,0,16,0"
- Background="WhiteSmoke"
- Command="{Binding ChangePrintModCommand}"
- CommandParameter="{Binding ElementName=ModBookletRdo}"
- Content="Booklet"
- Style="{StaticResource PrintModRdoStyle}" />
- </StackPanel>
- </StackPanel>
- </Grid>
- <Grid
- Grid.Row="1"
- Margin="0,0,8,0"
- VerticalAlignment="Top">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="29*" />
- <ColumnDefinition Width="213*" />
- </Grid.ColumnDefinitions>
- <ContentControl
- Grid.ColumnSpan="2"
- prism:RegionManager.RegionName="{Binding HomePagePrinterModRegionName}"
- Visibility="Visible" />
- </Grid>
- </Grid>
- </Grid>
- </Grid>
- </cus:DialogContent.Content>
- <cus:DialogContent.BottmBar>
- <Grid Grid.Row="2">
- <StackPanel
- Margin="15,0,0,16"
- HorizontalAlignment="Right"
- Orientation="Horizontal">
- <Button
- Width="80"
- Height="32"
- Margin="0,0,16,0"
- Command="{Binding ConfirmPrintCommand}"
- Content="Print"
- Style="{StaticResource Btn.cta}" />
- <Button
- Width="80"
- Height="32"
- Margin="0,0,16,0"
- Command="{Binding CancelCommand}"
- Content="Cancel"
- Style="{StaticResource PageSettingsBtnStyle}" />
- </StackPanel>
- </Grid>
- </cus:DialogContent.BottmBar>
- </cus:DialogContent>
- </UserControl>
|