123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <UserControl x:Class="PDF_Office.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterDocumentContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:prism="http://prismlibrary.com/" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- prism:ViewModelLocator.AutoWireViewModel="True" >
- <UserControl.Resources>
- <Style TargetType="Button" x:Key="PrePageBtnStyle">
- <Setter Property="Height" Value="24"></Setter>
- <Setter Property="Width" Value="24"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid x:Name="UserfulRegion">
- <Border x:Name="border" BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" CornerRadius="4" >
- <Grid>
- <Rectangle Width="24" Height="24" Fill="Transparent"></Rectangle>
- <Path x:Name="Path" Fill="{StaticResource color.icon.base.neutral.norm.lv1}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M3.11071 4.24945L5.43035 1.9298L4.36969 0.869141L0.769719 4.46912C0.476825 4.76201 0.476826 5.23688 0.769719 5.52978L4.36969 9.12975L5.43035 8.06909L3.11071 5.74945H14.5V4.24945H3.11071Z"></Path>
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="border" Value="{StaticResource color.item-state.hov.bg}"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="Button" x:Key="NextPageBtnStyle">
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type Button}">
- <Grid x:Name="UserfulRegion">
- <Border x:Name="border" BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" CornerRadius="4" >
- <Grid>
- <Rectangle Width="24" Height="24" Fill="Transparent"></Rectangle>
- <Path x:Name="Path" Fill="{StaticResource color.icon.base.neutral.norm.lv1}" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M11.8893 4.24992L0.5 4.24992V5.74992L11.8893 5.74992L9.56967 8.06958L10.6303 9.13024L14.2303 5.53026C14.5232 5.23737 14.5232 4.7625 14.2303 4.4696L10.6303 0.869629L9.56967 1.93029L11.8893 4.24992Z"></Path>
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter Property="Background" TargetName="border" Value="{StaticResource color.item-state.hov.bg}"></Setter>
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style TargetType="TextBox" x:Key="PageTxtStyle">
- <Setter Property="Height" Value="24"></Setter>
- <Setter Property="Width" Value="57"></Setter>
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TextBox">
- <Border BorderBrush="{StaticResource color.field.border.norm}" BorderThickness="1" Background="{StaticResource color.field.bg.def}" CornerRadius="4">
- <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden"
- VerticalAlignment="Center" MinHeight="20"/>
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Grid Height="356" Width="212">
- <Border Height="356" Width="212" Background="{StaticResource color.sys.layout.mg}" HorizontalAlignment="Center" VerticalAlignment="Top" CornerRadius="8">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="52"></RowDefinition>
- <RowDefinition></RowDefinition>
- <RowDefinition Height="56"></RowDefinition>
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="16">
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Orientation="Horizontal">
- <TextBlock Text="size:" FontFamily="Segoe UI" FontSize="12"></TextBlock>
- <TextBlock Text="{Binding PaperWidth}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
- <TextBlock Text="*" FontFamily="Segoe UI" FontSize="12"></TextBlock>
- <TextBlock Text="{Binding PaperHeight}" FontFamily="Segoe UI" FontSize="12"></TextBlock>
- <TextBlock Text="mm" FontFamily="Segoe UI" FontSize="12"></TextBlock>
- </StackPanel>
- </Grid>
- <Border Grid.Row="1" Width="{Binding ViewBoxWidth}" Height="{Binding ViewBoxHeight}" BorderThickness="1" BorderBrush="#19000000" CornerRadius="2">
- <Grid Background="White">
- <Viewbox>
- <Image Name="Image" Source="{Binding BitmapSource}" RenderOptions.BitmapScalingMode="HighQuality"></Image>
- </Viewbox>
- </Grid>
- </Border>
- <Grid Grid.Row="2">
- <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
- <Button Name="PrePageBtn" Tag="PrePage" Style="{StaticResource PrePageBtnStyle}" Height="24" Width="24" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding TurnPageCommand}" CommandParameter="{Binding ElementName=PrePageBtn}">
- </Button>
- <TextBox x:Name="CurrentPageIndexTxt" Style="{StaticResource PageTxtStyle}" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Margin="10,0,5,0" Text="{Binding TargetPaperIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" >
- <i:Interaction.Triggers>
- <i:EventTrigger x:Name="PropertyChanged">
- <i:InvokeCommandAction Command="{Binding JumpPageCommand}" CommandParameter="{Binding ElementName=CurrentPageIndexTxt}"></i:InvokeCommandAction>
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </TextBox>
- <TextBlock Text="of" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="0" FontFamily="Segoe UI" FontSize="14"></TextBlock>
- <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5" Text="{Binding PrintedPageCount}"></TextBlock>
- <Button Name="NextPageBtn" Tag="NextPage" Style="{StaticResource NextPageBtnStyle}" Height="24" Width="24" HorizontalAlignment="Left" FontSize="16" Background="WhiteSmoke" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Command="{Binding TurnPageCommand}" CommandParameter="{Binding ElementName=NextPageBtn}">
- </Button>
- </StackPanel>
- </Grid>
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|