1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- <UserControl x:Class="Compdfkit_Tools.PDFControl.SetEncryptionControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:Compdfkit_Tools"
- xmlns:common="clr-namespace:Compdfkit_Tools.Common"
- xmlns:pdfControl="clr-namespace:Compdfkit_Tools.PDFControl"
- mc:Ignorable="d"
- Height="362" Width="368">
- <UserControl.Resources>
- <ResourceDictionary>
- <common:AndMultiBoolValueConverter x:Key="AndMultiValueConverter"></common:AndMultiBoolValueConverter>
- <common:ReverseBoolConverter x:Key="ReverseBoolConverter" />
- </ResourceDictionary>
- </UserControl.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="2*"></RowDefinition>
- </Grid.RowDefinitions>
-
- <Grid Background="White" Margin="20,0,0,0" Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
- <TextBlock Foreground="#001A4E" Text="Open the Document" FontWeight="Bold" FontSize="16"></TextBlock>
- </Grid>
- <Border Margin="0,10,7,12" BorderBrush="#33000000" BorderThickness="1">
- <Grid Margin="8,0,20,15">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="Auto"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <CheckBox IsChecked="{Binding IsUserPasswordEnabled, Mode=OneWayToSource}" x:Name="ChbUserPassword" Width="20" Height="20" Margin="0,0,0,0"></CheckBox>
- <TextBlock Height="20" FontFamily="Segoe UI" FontSize="14" Text="Require a password to open the document"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="20,0,0,-5">
- <TextBlock Height="25" FontFamily="Segoe UI" FontSize="14" Text="Open Password"/>
- <common:PasswordBoxControl Password="{Binding UserPassword, Mode=OneWayToSource}" IsEnabled="{Binding IsUserPasswordEnabled,Mode=OneWay}" Margin="10,0,0,0" Watermark="Enter Password" Height="41" Width="170"></common:PasswordBoxControl>
- </StackPanel>
- </Grid>
- </Border>
-
- <Grid Grid.Row="1" Background="White" Margin="20,0,0,0" Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
- <TextBlock Foreground="#001A4E" Text="Password and Permissions" FontWeight="Bold" FontSize="16"></TextBlock>
- </Grid>
- <Border Grid.Row="1" Margin="0,10,7,12" BorderBrush="#33000000" BorderThickness="1">
- <Grid Margin="8,10,20,15">
- <Grid.RowDefinitions>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- <RowDefinition Height="*"></RowDefinition>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <CheckBox IsChecked="{Binding IsOwnerPasswordEnabled,Mode=OneWayToSource}" x:Name="ChbOwnerPassword" Width="20" Height="20" Margin="0,5,0,0"></CheckBox>
- <TextBlock Height="20" FontFamily="Segoe UI" FontSize="14" Text="Restrict printing or copying"></TextBlock>
- </StackPanel>
- <StackPanel Orientation="Horizontal" Grid.Row="1" Margin="20,0,0,0">
- <TextBlock Height="25" FontFamily="Segoe UI" FontSize="14" Text="Open Password"/>
- <common:PasswordBoxControl Password="{Binding OwnerPassword, Mode=OneWayToSource}" IsEnabled="{Binding IsOwnerPasswordEnabled}" Margin="10,0,0,0" Watermark="Enter Password" Height="41" Width="170"></common:PasswordBoxControl>
- </StackPanel>
-
- <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,0,0,0">
- <CheckBox Width="20" Height="20" Margin="0,5,0,0"
- IsChecked="{Binding IsAllowPrint,Converter={StaticResource ReverseBoolConverter} ,Mode=OneWayToSource}"
- IsEnabled="{Binding IsOwnerPasswordEnabled}">
- </CheckBox>
- <TextBlock Height="20" FontFamily="Segoe UI" FontSize="14" Text="Restrict document printing"></TextBlock>
- </StackPanel>
-
- <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="20,0,0,0">
- <CheckBox Width="20" Height="20" Margin="0,5,0,0"
- IsChecked="{Binding IsAllowCopy,Converter={StaticResource ReverseBoolConverter} ,Mode=OneWayToSource}"
- IsEnabled="{Binding IsOwnerPasswordEnabled}">
- </CheckBox>
- <TextBlock Height="20" FontFamily="Segoe UI" FontSize="14" Text="Restrict content copying"></TextBlock>
- </StackPanel>
- </Grid>
- </Border>
- </Grid>
- </UserControl>
|