12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <Window x:Class="ComPDFKitDemo.PageEditor.CropWindow"
- 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:local="clr-namespace:ComPDFKitDemo.PageEditor"
- mc:Ignorable="d"
- Title="CropWindow" Height="520" Width="600" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" ResizeMode="CanMinimize">
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="200"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <Border BorderThickness="1" BorderBrush="LightGray" Margin="10" Padding="10,5,10,5">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <ComboBox Name="CropTypeBox">
- <ComboBoxItem Content="MediaBox"></ComboBoxItem>
- <ComboBoxItem Content="CropBox" IsSelected="True"></ComboBoxItem>
- <ComboBoxItem Content="BleedBox"></ComboBoxItem>
- <ComboBoxItem Content="TrimBox"></ComboBoxItem>
- <ComboBoxItem Content="ArtBox"></ComboBoxItem>
- </ComboBox>
-
- <Grid Grid.Row="1">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"></ColumnDefinition>
- <ColumnDefinition Width="*"></ColumnDefinition>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="10,10,0,10">Constrain Proportions:</TextBlock>
- <TextBlock Grid.Row="1" Width="50" Margin="10,20,0 0">Left:</TextBlock>
- <TextBox Name="LeftText" InputScope="Number" Grid.Row="1" Height="20" Grid.Column="1" Margin="10,20,0 0" IsReadOnly="{Binding ElementName=EnableCheck,Path=IsChecked}" TextAlignment="Center"></TextBox>
- <TextBlock Grid.Row="2" Width="50" Margin="10,20,0 0">Top:</TextBlock>
- <TextBox Name="TopText" InputScope="Number" Grid.Row="2" Height="20" Grid.Column="1" Margin="10,20,0 0" IsReadOnly="{Binding ElementName=EnableCheck,Path=IsChecked}" TextAlignment="Center"></TextBox>
- <TextBlock Grid.Row="3" Width="50" Margin="10,20,0 0">Right:</TextBlock>
- <TextBox Name="RightText" InputScope="Number" Grid.Row="3" Height="20" Grid.Column="1" Margin="10,20,0 0" IsReadOnly="{Binding ElementName=EnableCheck,Path=IsChecked}" TextAlignment="Center"></TextBox>
- <TextBlock Grid.Row="4" Width="50" Margin="10,20,0 0">Bottom:</TextBlock>
- <TextBox Name="BottomText" InputScope="Number" Grid.Row="4" Height="20" Grid.Column="1" Margin="10,20,0 0" IsReadOnly="{Binding ElementName=EnableCheck,Path=IsChecked}" TextAlignment="Center"></TextBox>
- <StackPanel Grid.Row="5" Grid.ColumnSpan="2" Margin="10,10,0 0">
- <CheckBox Name="EnableCheck">Disable Input</CheckBox>
- <Button Margin="0,10,0,0" Click="RefreshButton_Click">Refresh</Button>
- </StackPanel>
- </Grid>
- <Grid Grid.Row="2">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- <RowDefinition Height="auto"></RowDefinition>
- </Grid.RowDefinitions>
- <TextBlock Grid.ColumnSpan="2" Margin="10,20,0,10">Page Ranges:</TextBlock>
- <RadioButton Grid.Row="1" Margin="10,5,0,10" Checked="RadioButton_Checked" Tag="AllRadioBtn">All Pages</RadioButton>
- <RadioButton Name="RangeRadioBtn" Grid.Row="2" Margin="10,5,0,10" IsChecked="True" Checked="RadioButton_Checked" Tag="RangeRadioBtn">Ranges</RadioButton>
- <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="5,10,0,10">
- <TextBox Name="StartPageText" Width="40" Height="20" TextAlignment="Center"></TextBox>
- <TextBlock Padding="3,0,3,0"> To</TextBlock>
- <TextBox Name="EndPageText" Width="40" Height="20" TextAlignment="Center"></TextBox>
- <TextBlock Name="PageCountText" Padding="3,0,0,0"></TextBlock>
- </StackPanel>
- </Grid>
- </Grid>
- </Border>
- <Border Grid.Column="1" BorderThickness="1" BorderBrush="LightGray" Margin="10" Padding="10,5,10,5">
- <local:CropControl x:Name="CropUI" CropChanged="CropUI_CropChanged">
- </local:CropControl>
- </Border>
- <StackPanel Grid.Row="1" Grid.ColumnSpan="2" Orientation="Horizontal" HorizontalAlignment="Right">
- <Button Padding="20,2,20,2" Margin="0,5,10,5" Click="SaveButton_Click">Ok</Button>
- <Button Padding="10,2,10,2" Margin="0,5,10,5" Click="CancelButton_Click">Cancel</Button>
- </StackPanel>
- </Grid>
- </Window>
|