123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283 |
- <UserControl
- x:Class="PDF_Master.Views.PropertyPanel.ViewModular.PageContent"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:Convert="clr-namespace:PDF_Master.DataConvert"
- xmlns:DataConvert="clr-namespace:PDF_Master.DataConvert"
- xmlns:ViewModular="clr-namespace:PDF_Master.ViewModels.PropertyPanel.ViewModular"
- xmlns:customControl="clr-namespace:PDF_Master.CustomControl"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
- xmlns:local="clr-namespace:PDF_Master.Views.PropertyPanel.ViewModular"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:prism="http://prismlibrary.com/"
- d:DataContext="{d:DesignInstance Type=ViewModular:PageContentViewModel}"
- d:DesignHeight="32"
- d:DesignWidth="332"
- prism:ViewModelLocator.AutoWireViewModel="True"
- Background="Transparent"
- mc:Ignorable="d">
- <UserControl.Resources>
- <ResourceDictionary>
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="pack://application:,,,/Styles/ButtonStyle.xaml" />
- </ResourceDictionary.MergedDictionaries>
- <Convert:ObjectConvert x:Key="ObjectConvert" />
- <PathGeometry x:Key="Ic_FirstPageButtonPath" Figures="M5.25 6V18H6.75V6H5.25ZM12.8803 8.93035L10.5607 11.25H18.95V12.75H10.5607L12.8803 15.0696L11.8196 16.1303L8.21967 12.5303C7.92678 12.2374 7.92678 11.7626 8.21967 11.4697L11.8196 7.86969L12.8803 8.93035Z" />
- <PathGeometry x:Key="Ic_PrePageButtonPath" Figures="M7.61071 11.2499L9.93035 8.93029L8.86969 7.86963L5.26972 11.4696C4.97683 11.7625 4.97683 12.2374 5.26972 12.5303L8.86969 16.1302L9.93035 15.0696L7.61071 12.7499H19V11.2499H7.61071Z" />
- <PathGeometry x:Key="Ic_NextPageButtonPath" Figures="M16.3893 11.2499L5 11.2499V12.7499L16.3893 12.7499L14.0697 15.0696L15.1303 16.1302L18.7303 12.5303C19.0232 12.2374 19.0232 11.7625 18.7303 11.4696L15.1303 7.86963L14.0697 8.93029L16.3893 11.2499Z" />
- <PathGeometry x:Key="Ic_LastPageButtonPath" Figures="M17.25 6V18H18.75V6H17.25ZM11.0697 15.0697L13.3893 12.75L5 12.75V11.25L13.3893 11.25L11.0697 8.93038L12.1303 7.86972L15.7303 11.4697C16.0232 11.7626 16.0232 12.2375 15.7303 12.5304L12.1303 16.1303L11.0697 15.0697Z" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Border
- CornerRadius="4" Background="{StaticResource color.sys.layout.anti}" Effect="{StaticResource shadow.neutral.m}">
- <StackPanel Name="ParentPanel" Orientation="Horizontal" >
- <StackPanel Orientation="Horizontal" Margin="16,0,16,0" MinWidth="219" >
- <Border
- Width="24"
- Height="24"
- Margin="0,0,8,0"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- CornerRadius="4">
- <customControl:PathButton
- x:Name="BtnFirstPage"
- Command="{Binding FirstPageCommand}"
- Icon="{StaticResource Ic_FirstPageButtonPath}"
- IconFill="#616469"
- IconMouseOver="{StaticResource Ic_FirstPageButtonPath}"
- IconMouseOverFill="#616469"
- IconPress="{StaticResource Ic_FirstPageButtonPath}"
- IconPressFill="#616469" />
- </Border>
- <Border
- Width="24"
- Height="24"
- Margin="0,0,8,0"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- CornerRadius="4">
- <customControl:PathButton
- x:Name="BtnPrePage"
- Command="{Binding PrePageCommand}"
- Icon="{StaticResource Ic_PrePageButtonPath}"
- IconFill="#616469"
- IconMouseOver="{StaticResource Ic_PrePageButtonPath}"
- IconMouseOverFill="#616469"
- IconPress="{StaticResource Ic_PrePageButtonPath}"
- IconPressFill="#616469" />
- </Border>
- <Border
- Width="57"
- Height="24"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- CornerRadius="4">
- <TextBox
- Width="54"
- VerticalAlignment="Center"
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="0"
- InputMethod.IsInputMethodEnabled="False"
- Foreground="#252629"
- Text="{Binding CurrentPage}"
- TextAlignment="Left">
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="KeyDown">
- <i:InvokeCommandAction Command="{Binding PageTextKeyDownCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- <i:EventTrigger EventName="PreviewKeyDown">
- <i:InvokeCommandAction Command="{Binding PageTextPreviewKeyDownCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- <i:EventTrigger EventName="LostFocus">
- <i:InvokeCommandAction Command="{Binding PageTextFocusableChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </TextBox>
- </Border>
- <TextBlock
- Margin="8,0,0,0"
- x:Name="TxtPageCount"
- Height="32"
- MinWidth="34"
- Padding="0,5.5,0,0"
- FontFamily="Segoe UI"
- FontSize="14"
- Foreground="#252629"
- Text="{Binding PageCount, StringFormat=/ {0}}"
- TextAlignment="Left" />
- <Border
- Width="24"
- Height="24"
- Margin="0,0,8,0"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- CornerRadius="4">
- <customControl:PathButton
- x:Name="BtnNextPage"
- Command="{Binding NextPageCommand}"
- Icon="{StaticResource Ic_NextPageButtonPath}"
- IconFill="#616469"
- IconMouseOver="{StaticResource Ic_NextPageButtonPath}"
- IconMouseOverFill="#616469"
- IconPress="{StaticResource Ic_NextPageButtonPath}"
- IconPressFill="#616469" />
- </Border>
- <Border
- Width="24"
- Height="24"
- Margin="0,0,8,0"
- BorderBrush="#DFE1E5"
- BorderThickness="1"
- CornerRadius="4">
- <customControl:PathButton
- x:Name="BtnLastPage"
- Command="{Binding LastPageCommand}"
- Icon="{StaticResource Ic_LastPageButtonPath}"
- IconFill="#616469"
- IconMouseOver="{StaticResource Ic_LastPageButtonPath}"
- IconMouseOverFill="#616469"
- IconPress="{StaticResource Ic_LastPageButtonPath}"
- IconPressFill="#616469" />
- </Border>
- </StackPanel>
- <Border
- Width="70"
- Height="24"
- Margin="0,0,11,0"
- BorderBrush="#E2E3E6"
- BorderThickness="0">
- <Grid>
- <ComboBox
- Name="ZoomBox"
- Background="Transparent"
- BorderBrush="Transparent"
- BorderThickness="0"
- MaxDropDownHeight="510"
- SelectedIndex="{Binding SelectedIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
- <ComboBoxItem x:Name="ActualSize" Style="{StaticResource ZoomComboxItemStyle}">
- <StackPanel Orientation="Horizontal">
- <Border x:Name="ActualSizeBorder" Margin="7,0,12,0">
-
- </Border>
- <TextBlock
- x:Name="ActualSizeText"
- VerticalAlignment="Center"
- Text="Actual Size" />
- </StackPanel>
- </ComboBoxItem>
- <ComboBoxItem x:Name="FitWidth" Style="{StaticResource ZoomComboxItemStyle}">
- <StackPanel Orientation="Horizontal ">
- <Border Name="FitWidthBorder" Margin="7,0,12,0">
-
- </Border>
- <TextBlock x:Name="FitWidthText" Text="Fit Width" />
- </StackPanel>
- </ComboBoxItem>
- <ComboBoxItem x:Name="FitHeight" Style="{StaticResource ZoomComboxItemStyle}">
- <StackPanel Orientation="Horizontal">
- <Border Name="FitHeightBorder" Margin="7,0,12,0">
-
- </Border>
- <TextBlock x:Name="FitHeightText" Text="Fit Height" />
- </StackPanel>
- </ComboBoxItem>
- <Separator
- Height="1"
- BorderBrush="#33000000"
- BorderThickness="1"
- Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="10%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="10" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="25%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="25" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="50%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="50" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="100%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="100" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="150%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="150" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="200%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="200" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="300%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="300" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="400%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="400" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="500%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="500" />
- <ComboBoxItem
- Padding="30,0,0,0"
- Content="1000%"
- Style="{StaticResource ZoomComboxItemStyle}"
- Tag="1000" />
- <i:Interaction.Triggers>
- <i:EventTrigger EventName="SelectionChanged">
- <i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" PassEventArgsToCommand="True" />
- </i:EventTrigger>
- </i:Interaction.Triggers>
- </ComboBox>
- <TextBox
- Name="TxtZoom"
- Height="20"
- Margin="2,0,25,0"
- TextAlignment="Right"
- VerticalAlignment="Center"
- Background="White"
- BorderThickness="0"
- FontFamily="Segoe UI"
- FontSize="14"
- IsReadOnly="True"
- Text="{Binding CurrentZoom, StringFormat={}{0}%}"
- />
- </Grid>
- </Border>
- </StackPanel>
- </Border>
-
- {Binding LoadedCommand}
- {StaticResource ResourceKey=ObjectConvert}
- </UserControl>
|