123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:input="clr-namespace:System.Windows.Input;assembly=PresentationCore"
- xmlns:cus="clr-namespace:PDF_Office.CustomControl"
- xmlns:prism="http://prismlibrary.com/"
- xmlns:homepageprinter="clr-namespace:PDF_Office.ViewModels.Dialog.HomePageToolsDialogs.HomePagePrinter"
- d:DataContext="{d:DesignInstance Type=homepageprinter:HomePagePrinterDialogViewModel}"
- prism:ViewModelLocator.AutoWireViewModel="True"
- d:DesignHeight="650"
- d:DesignWidth="903"
- mc:Ignorable="d"
- >
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="63"></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.Row="0" Text="打印" FontSize="20" FontWeight="ExtraBlack" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20,0,0,0" Height="28" Width="120"/>
- <Border Grid.Row="1" BorderBrush="Gray" BorderThickness="0,1,0,1" VerticalAlignment="Center" Height="537">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="2*"/>
- <ColumnDefinition Width="4*"/>
- </Grid.ColumnDefinitions>
- <Grid Grid.Column="0">
- <Border Height="430" Width="269" Background="LightGray" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="36"></RowDefinition>
- <RowDefinition></RowDefinition>
- </Grid.RowDefinitions>
- <Grid>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal">
- <TextBlock Text="大小:"></TextBlock>
- <TextBlock Text="{Binding PaperWidth}"></TextBlock>
- <TextBlock Text="*"></TextBlock>
- <TextBlock Text="{Binding PaperHeight}"></TextBlock>
- <TextBlock Text="mm"></TextBlock>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1" Width="{Binding ViewBoxWidth}" Height="{Binding ViewBoxHeight}">
- <Grid.RenderTransform>
- <RotateTransform Angle="{Binding RotateAngle}" CenterX="{Binding RotateCenterX}" CenterY="{Binding RotateCenterY}"></RotateTransform>
- </Grid.RenderTransform>
- <Border Background="White" CornerRadius="1" Width="{Binding CanvasWidth, Mode=OneWay}" Height="{Binding CanvasHeight,Mode=OneWay}" >
- <Viewbox Width="{Binding ViewBoxWidth}" Height="{Binding ViewBoxHeight}" Margin="{Binding ViewBoxMargin}">
- <Image Name="Image" Source="{Binding BitmapSource}"></Image>
- </Viewbox>
- </Border>
- </Grid>
- </Grid>
-
- </Border>
- <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Bottom">
- <Button Name="PrePageBtn" Width="20" Height="20" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsEnabled="{Binding IsEnableForGetPreviousPage}" Click="PrePageBtn_Click">
- <TextBlock Text="<" VerticalAlignment="Center"></TextBlock>
- </Button>
- <TextBox x:Name="CurrentPageIndexTextBox" Width="30" Height="25" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,0,5,0" Text="{Binding CurrentListIndexString, Mode=OneWay}" input:InputMethod.IsInputMethodEnabled="False" PreviewTextInput="CurrentPageIndexTextBox_PreviewTextInput" KeyDown="CurrentPageIndexTextBox_KeyDown" ></TextBox>
- <TextBlock Text="of" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0"></TextBlock>
- <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Text="{Binding MaxPageNumber}"></TextBlock>
- <Button Name="NextPageBtn" Width="20" Height="20" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" IsEnabled="{Binding IsEnableForGetNextPage }" Click="NextPageBtn_Click">
- <TextBlock Text=">" VerticalAlignment="Center"></TextBlock>
- </Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Column="1">
- <Grid.RowDefinitions>
- <RowDefinition Height="1.2*"/>
- <RowDefinition Height="0.9*"/>
- <RowDefinition Height="2*"/>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0">
- <StackPanel Orientation="Vertical">
- <StackPanel Orientation="Horizontal" Margin="0,60,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="打印机: " Height="20" Width="56" ></TextBlock>
- <ComboBox Width="277" Height="32" Margin="8,0,0,0" ItemsSource="{Binding PrinterNameList}" SelectedIndex="{Binding PrinterIndex}"></ComboBox>
- </StackPanel>
- <Button Content="页面设置" Height="32" Width="91" Margin="31,0,0,0" Command="{Binding SetPaperSizeCommand}"/>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,19,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="预置: " Height="20" Width="42"></TextBlock>
- <ComboBox Width="139" Height="32" Margin="22,0,0,0"></ComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="28,0,0,0">
- <TextBlock Height="20" Width="42" Text="份数: "></TextBlock>
- <cus:NumericUpDown Height="32" Width="76" Margin="15,0,0,0"></cus:NumericUpDown>
- </StackPanel>
- <CheckBox VerticalAlignment="Center" Margin="27,0,0,0" IsChecked="{Binding IsBlackAndWhite}" Command="{Binding SetIsBlackAndWhiteCommand}">
- <TextBlock Text="黑白色 "/>
- </CheckBox>
- <CheckBox VerticalAlignment="Center" Margin="27,0,0,0">
- <TextBlock Text="双面打印"/>
- </CheckBox>
- </StackPanel>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="1">
- <StackPanel Orientation="Vertical">
- <TextBlock Text="打印设置" FontWeight="ExtraBlack"/>
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="页面范围: " Height="20" Width="70"></TextBlock>
- <cus:WritableComboBox x:Name="PageRangeComboBox" Width="190" Height="32" Margin="10,0,0,0" Loaded="PageRangeComboBox_Loaded" Text="{Binding CustomPageRange}" IsCurrentPage="{Binding IsCurrentPage}" SelectedIndex="{Binding PageRangeIndex, Mode=TwoWay}"></cus:WritableComboBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="35,0,0,0">
- <TextBlock Text="打印方向: " Height="20" Width="70"></TextBlock>
- <ComboBox Name="PrintOrientationComboBox" Width="190" Height="32" Margin="10,0,0,0" ItemsSource="{Binding PrintOrientationList}" SelectedIndex="{Binding PrintOrientationIndex, Mode=TwoWay}" SelectionChanged="PrintOrientationComboBox_SelectionChanged"></ComboBox>
- </StackPanel>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,12,0,0">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="打印内容: " Height="20" Width="70"></TextBlock>
- <ComboBox Width="190" Height="32" Margin="10,0,0,0" ItemsSource="{Binding PrintContentList}" SelectedIndex="{Binding PrintContentIndex}" SelectionChanged="ComboBox_SelectionChanged"></ComboBox>
- </StackPanel>
- <CheckBox x:Name="ReversePageCheckBox" Margin="35,0,0,0" VerticalAlignment="Center" IsChecked="{Binding IsPageIndexReverse}" Command="{Binding SetIsPageIndexReverseCommand}" Click="ReversePageCheckBox_Click">
- <TextBlock Text="逆页序打印"/>
- </CheckBox>
- </StackPanel>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2">
- <StackPanel Height="auto" Orientation="Vertical">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="调整页面大小和处理页面" FontWeight="ExtraBlack"/>
- <Button Content="?" FontSize="6" Width="16" Height="16" Margin="7,0,0,0"></Button>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Margin="0,10,0,0">
- <Button x:Name="ModSize" Background="WhiteSmoke" Width="126" Height="32" IsEnabled="{Binding IsEnableForModSize, Mode=OneWay}" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModSize}">
- <Border>
- <TextBlock Text="大小"/>
- </Border>
- </Button>
- <!--Button Name="ModPoster" Background="WhiteSmoke" Width="126" Height="32" Margin="25,0,25,0" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModPoster}"-->
- <Button Name="ModPoster" Background="WhiteSmoke" Width="126" Height="32" Margin="25,0,25,0" IsEnabled="{Binding IsEnableForModPoster, Mode=OneWay}">
- <Border>
- <TextBlock Text="海报"></TextBlock>
- </Border>
- </Button>
- <Button Name="ModMultiple" Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,25,0" IsEnabled="{Binding IsEnableForModMultiple, Mode=OneWay}" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModMultiple}">
- <Border>
- <TextBlock Text="多页"></TextBlock>
- </Border>
- </Button>
- <Button Name="ModBooklet" Background="WhiteSmoke" Width="126" Height="32" Margin="0,0,10,0" IsEnabled="{Binding IsEnableForModBooklet, Mode=OneWay}" Command="{Binding ChangePrintModCommand}" CommandParameter="{Binding ElementName=ModBooklet}">
- <Border>
- <TextBlock Text="小册子"></TextBlock>
- </Border>
- </Button>
- </StackPanel>
- <StackPanel>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="47*"/>
- <RowDefinition Height="4*"/>
- </Grid.RowDefinitions>
- <ContentControl Height="180" Margin="12,12,12,12" x:Name="PrintMod" prism:RegionManager.RegionName="{Binding PrintModRegionName}" Visibility="{Binding PrintModVisible}" Grid.RowSpan="2"/>
- </Grid>
- </StackPanel>
- </StackPanel>
- </Grid>
- </Grid>
- </Grid>
- </Border>
- <Grid Grid.Row="2">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="15,0,0,0">
- <Button Width="98" Height="32" Content="取消" Margin="0,0,10,0"></Button>
- <Button Width="98" Height="32" Content="打印" Margin="0,0,16,0" Command="{Binding ConfirmPrintCommand}"></Button>
- </StackPanel>
- </Grid>
- </Grid>
- </UserControl>
|