123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242 |
- <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:prism="http://prismlibrary.com/" xmlns:cus="clr-namespace:PDF_Master.CustomControl" xmlns:homepageprinter="clr-namespace:PDF_Master.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:i="http://schemas.microsoft.com/xaml/behaviors" xmlns:DataContext="{d:DesignInstance Type=homepageprinter:HomePagePrinterDialogViewModel}"
- prism:ViewModelLocator.AutoWireViewModel="True"
- prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}">
- <UserControl.Resources>
- <Style x:Key="PageSettingsBtnStyle" TargetType="Button">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid>
- <Border x:Name="PageSettingsBtnBorder" BorderBrush="{StaticResource color.btn.sec.border-color}" Background="Transparent" BorderThickness="1" CornerRadius="4">
- <Grid>
- <TextBlock Text="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="14" FontFamily="Segoe UI"></TextBlock>
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="PageSettingsBtnBorder" Value="{StaticResource color.btn.sec.bg.hov}"></Setter>
- </Trigger>
- <Trigger Property="IsPressed" Value="True">
- <Setter Property="Background" TargetName="PageSettingsBtnBorder" Value="{StaticResource color.btn.sec.bg.act}"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="RadioButton" x:Key="PrintModRdoStyle">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type RadioButton}">
- <Border x:Name="PrintModRdo" Background="{StaticResource color.btn.sec.bg.norm}"
- BorderBrush="{StaticResource color.btn.sec.border-color }"
- BorderThickness="1"
- CornerRadius="4"
- VerticalAlignment="Center">
- <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}">
- <TextBlock Text="{TemplateBinding Content}" FontSize="14" Foreground="{StaticResource color.btn.sec.text.def}" HorizontalAlignment="Center" VerticalAlignment="Center"></TextBlock>
- </Grid>
- </Border>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="PrintModRdo" Value="{StaticResource color.btn.sec.bg.hov}"></Setter>
- </Trigger>
- <Trigger Property="IsChecked" Value="False">
- <Setter Property="Background" TargetName="PrintModRdo" Value="{StaticResource color.btn.sec.bg.norm}"></Setter>
- </Trigger>
- <Trigger Property="IsChecked" Value="True">
- <Setter Property="Background" TargetName="PrintModRdo" Value="{StaticResource color.btn.sec.bg.act}"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="HelpTipStyle" TargetType="Label"></Style>
- </UserControl.Resources>
- <cus:DialogContent Header="{Binding T_Title}">
- <cus:DialogContent.Content>
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="238"></ColumnDefinition>
- <ColumnDefinition Width="492"></ColumnDefinition>
- </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>
- <RowDefinition Height="216"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="0,0,0,0" >
- <Grid.RowDefinitions>
- <!--61 、27 -->
- <RowDefinition Height="72"></RowDefinition>
- <RowDefinition Height="150"></RowDefinition>
- <RowDefinition Height="0"></RowDefinition>
- <RowDefinition Height="0"/>
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding T_Printer}" FontFamily="Segoe UI" FontSize="14" Height="22" ></TextBlock>
- <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:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- <Button Name="PageSettingsBtn" Style="{StaticResource PageSettingsBtnStyle}" Content="{Binding T_PageSettings}" Height="32" Width="116" Command="{Binding SetPaperCommand}" />
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Height="22" Text="{Binding T_Copies}" FontFamily="Segoe UI" FontSize="14"></TextBlock>
- <cus:NumericUpDown Height="32" Width="132" Margin="16,0,0,0" Minimum="1" Text="{Binding CopiesNumber}"></cus:NumericUpDown>
- </StackPanel>
- <CheckBox Name="GrayscaleChk" VerticalAlignment="Center" Margin="17,0,0,0" Command="{Binding SetGrayscaleCommand}" CommandParameter="{Binding ElementName=GrayscaleChk}">
- <TextBlock Text="{Binding T_BlackAndWhite}" Foreground="#252629" FontFamily="Segoe UI" FontSize="14"/>
- </CheckBox>
- </StackPanel>
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Vertical" Margin="0,18,0,0">
- <TextBlock Text="{Binding T_PrintSettings}" FontFamily="Segoe UI" FontSize="12" Foreground="#616469"/>
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Page range:" FontFamily="Segoe UI" FontSize="14" Height="22" Width="80"></TextBlock>
- <cus:WritableComboBox x:Name="PageRangeComboBox" Loaded="PageRangeComboBox_Loaded" Text="{Binding CustomRangeString, Mode=TwoWay}" Width="132" Height="32" Margin="16,0,0,0" MaxPageRange="{Binding MaxPageRange, Mode=TwoWay}" SelectedIndex="{Binding PageRangeSelectIndex,Mode=TwoWay}">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SetPageRangeSelectionIndexCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}"></i:InvokeCommandAction>
- </i:EventTrigger>
- <i:KeyTrigger FiredOn="KeyDown" Key="Return">
- <i:InvokeCommandAction Command="{Binding SetCustomPageRangeCommand}" CommandParameter="{Binding ElementName=PageRangeComboBox}"></i:InvokeCommandAction>
- </i:KeyTrigger>
- </i:Interaction.Triggers>
- </cus:WritableComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="20,0,0,0">
- <TextBlock Text="{Binding T_Orientation}" FontFamily="Segoe UI" FontSize="14" Height="22"></TextBlock>
- <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:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- </StackPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,8,0,0">
- <TextBlock Text="{Binding T_PrintContent}" FontFamily="Segoe UI" FontSize="14" Height="22" Width="80"></TextBlock>
- <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:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
- <CheckBox x:Name="ReversePageCbx" VerticalAlignment="Center" Command="{Binding SetReversePageCommand}" CommandParameter="{Binding ElementName=ReversePageCbx}">
- <TextBlock Text="{Binding T_ReversePages}" FontFamily="Segoe UI" FontSize="14"/>
- </CheckBox>
- <CheckBox x:Name="PrintBorderCbx" VerticalAlignment="Center" Margin="25,0,0,0" Command="{Binding SetPrintBorderCommand}" CommandParameter="{Binding ElementName=PrintBorderCbx}" Visibility="{Binding PrintPageBorderVisibility}">
- <TextBlock Text="Print page border" FontFamily="Segoe UI" FontSize="14"/>
- </CheckBox>
- </StackPanel>
- </StackPanel>
- <!--TODO: Visibility解锁多功能打印-->
- <StackPanel Grid.Row="2" Orientation="Vertical" Margin="0,18,0,0" Visibility="Collapsed" Grid.RowSpan="2">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="Page Sizing & Handling" FontFamily="Segoe UI" FontSize="12" Foreground="#616469"/>
- <Label Padding="0,0,0,0" Margin="9,0,0,0">
- <Grid>
- <Ellipse Width="16" Height="16" Fill="white" Stroke="#CED0D4"></Ellipse>
- <Path 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" HorizontalAlignment="Center" VerticalAlignment="Center"></Path>
- </Grid>
- <Label.ToolTip>
- <ToolTip Background="{StaticResource color.sys.layout.dark.bg}" Width="350">
- <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>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text= " · " FontWeight="Bold"/>
- <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>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text= " · " FontWeight="Bold"/>
- <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>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text= " · " FontWeight="Bold"/>
- <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>
- <ColumnDefinition></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <TextBlock Foreground="{StaticResource color.sys.text.anti.norm}" Text= " · " FontWeight="Bold"/>
- <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 Orientation="Horizontal" Margin="0,10,0,0">
- <RadioButton Style="{StaticResource PrintModRdoStyle}" x:Name="ModSizeRdo" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModSizeRdo}" Content="Size" Background="WhiteSmoke" Width="111" Height="32" IsChecked="True">
- </RadioButton>
- <RadioButton Style="{StaticResource PrintModRdoStyle}" Name="ModPosterRdo" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModPosterRdo}" Content="Poster" Background="WhiteSmoke" Width="111" Height="32" Margin="8,0,8,0">
- </RadioButton>
- <RadioButton Style="{StaticResource PrintModRdoStyle}" Name="ModMultipleRdo" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModMultipleRdo}" Content="Multiple" Background="WhiteSmoke" Width="111" Height="32" Margin="0,0,8,0">
- </RadioButton>
- <RadioButton Style="{StaticResource PrintModRdoStyle}" Name="ModBookletRdo" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModBookletRdo}" Content="Booklet" Background="WhiteSmoke" Width="111" Height="32" Margin="0,0,16,0">
- </RadioButton>
- </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 prism:RegionManager.RegionName="{Binding HomePagePrinterModRegionName}" Visibility="Visible" Grid.ColumnSpan="2"/>
- </Grid>
- </Grid>
- </Grid>
- </Grid>
- </cus:DialogContent.Content>
- <cus:DialogContent.BottmBar>
- <Grid Grid.Row="2">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="15,0,0,16">
- <Button Width="80" Height="32" Style="{StaticResource Btn.cta}" Content="Print" Margin="0,0,16,0" Command="{Binding ConfirmPrintCommand}"></Button>
- <Button Width="80" Height="32" Style="{StaticResource PageSettingsBtnStyle}" Content="Cancel" Margin="0,0,16,0" Command="{Binding CancelCommand}"></Button>
- </StackPanel>
- </Grid>
- </cus:DialogContent.BottmBar>
- </cus:DialogContent>
- </UserControl>
|