123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <UserControl
- x:Class="PDF_Master.Views.Dialog.HomePageToolsDialogs.HomePagePrinter.HomePagePrinterDocumentContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:prism="http://prismlibrary.com/"
- prism:ViewModelLocator.AutoWireViewModel="True">
- <UserControl.Resources>
- <Style x:Key="PrePageBtnStyle" TargetType="Button">
- <Setter Property="Height" Value="24" />
- <Setter Property="Width" Value="24" />
- <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" />
- <Path
- x:Name="Path"
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M10.0607 12.1L14.6303 7.53039L13.5696 6.46973L8.46967 11.5697C8.17678 11.8626 8.17678 12.3374 8.46967 12.6303L13.5696 17.7303L14.6303 16.6696L10.0607 12.1Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="NextPageBtnStyle" TargetType="Button">
- <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" />
- <Path
- x:Name="Path"
- Width="24"
- Height="24"
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Data="M13.9393 12.1L9.36972 7.53039L10.4304 6.46973L15.5303 11.5697C15.8232 11.8626 15.8232 12.3374 15.5303 12.6303L10.4304 17.7303L9.36972 16.6696L13.9393 12.1Z"
- Fill="{StaticResource color.icon.base.neutral.norm.lv1}" />
- </Grid>
- </Border>
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsMouseOver" Value="True">
- <Setter TargetName="border" Property="Background" Value="{StaticResource color.item-state.hov.bg}" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- <Style x:Key="PageTxtStyle" TargetType="TextBox">
- <Setter Property="Height" Value="24" />
- <Setter Property="Width" Value="57" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="TextBox">
- <Border
- Background="{StaticResource color.field.bg.def}"
- BorderBrush="{StaticResource color.field.border.norm}"
- BorderThickness="1"
- CornerRadius="4">
- <ScrollViewer
- x:Name="PART_ContentHost"
- MinHeight="20"
- VerticalAlignment="Center"
- Focusable="false"
- HorizontalScrollBarVisibility="Hidden"
- VerticalScrollBarVisibility="Hidden" />
- </Border>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </UserControl.Resources>
- <Grid Width="212" Height="356">
- <Border
- Width="212"
- Height="356"
- HorizontalAlignment="Center"
- VerticalAlignment="Top"
- Background="{StaticResource color.sys.layout.mg}"
- CornerRadius="8">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="52" />
- <RowDefinition />
- <RowDefinition Height="56" />
- </Grid.RowDefinitions>
- <Grid Grid.Row="0" Margin="16">
- <StackPanel
- HorizontalAlignment="Center"
- VerticalAlignment="Bottom"
- Orientation="Horizontal">
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Text="size:" />
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Text="{Binding PaperWidth}" />
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Text="*" />
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Text="{Binding PaperHeight}" />
- <TextBlock
- FontFamily="Segoe UI"
- FontSize="12"
- Text="mm" />
- </StackPanel>
- </Grid>
- <Border
- Grid.Row="1"
- Width="{Binding ViewBoxWidth}"
- Height="{Binding ViewBoxHeight}"
- BorderBrush="#19000000"
- BorderThickness="1"
- CornerRadius="2">
- <Grid Background="White">
- <Viewbox>
- <Image
- Name="Image"
- RenderOptions.BitmapScalingMode="HighQuality"
- Source="{Binding BitmapSource}" />
- </Viewbox>
- </Grid>
- </Border>
- <Grid Grid.Row="2">
- <StackPanel
- HorizontalAlignment="Center"
- VerticalAlignment="Center"
- Orientation="Horizontal">
- <Button
- Name="PrePageBtn"
- Width="24"
- Height="24"
- HorizontalAlignment="Left"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="WhiteSmoke"
- Command="{Binding TurnPageCommand}"
- CommandParameter="{Binding ElementName=PrePageBtn}"
- FontSize="16"
- Style="{StaticResource PrePageBtnStyle}"
- Tag="PrePage" />
- <TextBox
- x:Name="CurrentPageIndexTxt"
- Margin="10,0,5,0"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Style="{StaticResource PageTxtStyle}"
- 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:EventTrigger>
- </i:Interaction.Triggers>
- </TextBox>
- <TextBlock
- Margin="0"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- FontFamily="Segoe UI"
- FontSize="14"
- Text="of" />
- <TextBlock
- Margin="5"
- HorizontalAlignment="Left"
- VerticalAlignment="Center"
- Text="{Binding PrintedPageCount}" />
- <Button
- Name="NextPageBtn"
- Width="24"
- Height="24"
- HorizontalAlignment="Left"
- HorizontalContentAlignment="Center"
- VerticalContentAlignment="Center"
- Background="WhiteSmoke"
- Command="{Binding TurnPageCommand}"
- CommandParameter="{Binding ElementName=NextPageBtn}"
- FontSize="16"
- Style="{StaticResource NextPageBtnStyle}"
- Tag="NextPage" />
- </StackPanel>
- </Grid>
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|