|
@@ -2,10 +2,13 @@
|
|
x:Class="PDF_Office.Views.Dialog.PageEditDialogs.InsertDialog"
|
|
x:Class="PDF_Office.Views.Dialog.PageEditDialogs.InsertDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
|
|
+ xmlns:convert="clr-namespace:PDF_Office.DataConvert"
|
|
xmlns:cus="clr-namespace:PDF_Office.CustomControl"
|
|
xmlns:cus="clr-namespace:PDF_Office.CustomControl"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
|
+ xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
|
xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
|
|
xmlns:local="clr-namespace:PDF_Office.Views.Dialog.PageEditDialogs"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
+ xmlns:model="clr-namespace:PDF_Office.Model.PageEdit"
|
|
xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
|
|
xmlns:pageeditdialogs="clr-namespace:PDF_Office.ViewModels.Dialog.PageEditDialogs"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
Width="480"
|
|
Width="480"
|
|
@@ -16,6 +19,26 @@
|
|
prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
mc:Ignorable="d">
|
|
mc:Ignorable="d">
|
|
|
|
+ <UserControl.Resources>
|
|
|
|
+ <ResourceDictionary>
|
|
|
|
+ <convert:FileToImageSourceConvert x:Key="FileToImageSourceConvert" />
|
|
|
|
+ <DataTemplate x:Key="CustomItem" DataType="{x:Type model:CustomPageItem}">
|
|
|
|
+ <StackPanel HorizontalAlignment="Center">
|
|
|
|
+ <Border>
|
|
|
|
+ <Image
|
|
|
|
+ Width="208"
|
|
|
|
+ Height="230"
|
|
|
|
+ Source="{Binding FilePath, Converter={StaticResource FileToImageSourceConvert}}" />
|
|
|
|
+ </Border>
|
|
|
|
+ <Label
|
|
|
|
+ Width="auto"
|
|
|
|
+ Margin="0,4,0,0"
|
|
|
|
+ Content="{Binding Name}"
|
|
|
|
+ FontSize="12" />
|
|
|
|
+ </StackPanel>
|
|
|
|
+ </DataTemplate>
|
|
|
|
+ </ResourceDictionary>
|
|
|
|
+ </UserControl.Resources>
|
|
<cus:DialogContent Header="插入自定义页面">
|
|
<cus:DialogContent Header="插入自定义页面">
|
|
<cus:DialogContent.Content>
|
|
<cus:DialogContent.Content>
|
|
<Grid>
|
|
<Grid>
|
|
@@ -24,22 +47,49 @@
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
</Grid.RowDefinitions>
|
|
- <ListBox BorderThickness="0" />
|
|
|
|
|
|
+ <ListBox
|
|
|
|
+ BorderThickness="0"
|
|
|
|
+ ItemTemplate="{StaticResource CustomItem}"
|
|
|
|
+ ItemsSource="{Binding Pages}"
|
|
|
|
+ SelectedIndex="{Binding ItemSelectedIndex, Mode=TwoWay}">
|
|
|
|
+ <ListBox.ItemsPanel>
|
|
|
|
+ <ItemsPanelTemplate>
|
|
|
|
+ <WrapPanel />
|
|
|
|
+ </ItemsPanelTemplate>
|
|
|
|
+ </ListBox.ItemsPanel>
|
|
|
|
+ </ListBox>
|
|
<StackPanel Grid.Row="1" Margin="16,0">
|
|
<StackPanel Grid.Row="1" Margin="16,0">
|
|
<TextBlock
|
|
<TextBlock
|
|
FontSize="14"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
FontWeight="SemiBold"
|
|
Text="页面大小" />
|
|
Text="页面大小" />
|
|
- <RadioButton
|
|
|
|
|
|
+ <StackPanel
|
|
Margin="0,12,0,0"
|
|
Margin="0,12,0,0"
|
|
- Content="当前页"
|
|
|
|
- GroupName="PageSize" />
|
|
|
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
|
+ Orientation="Horizontal">
|
|
|
|
+ <RadioButton
|
|
|
|
+ Height="32"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
|
+ Content="当前页"
|
|
|
|
+ GroupName="PageSize"
|
|
|
|
+ IsChecked="True" />
|
|
|
|
+ <Label
|
|
|
|
+ Height="32"
|
|
|
|
+ Margin="8,0"
|
|
|
|
+ HorizontalAlignment="Center"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
|
+ Content="{Binding CurrentPageSize}"
|
|
|
|
+ FontSize="14" />
|
|
|
|
+ </StackPanel>
|
|
<StackPanel Margin="0,12" Orientation="Horizontal">
|
|
<StackPanel Margin="0,12" Orientation="Horizontal">
|
|
<RadioButton
|
|
<RadioButton
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="标准"
|
|
Content="标准"
|
|
GroupName="PageSize" />
|
|
GroupName="PageSize" />
|
|
- <ComboBox Margin="8,0" />
|
|
|
|
|
|
+ <ComboBox
|
|
|
|
+ Width="228"
|
|
|
|
+ Height="32"
|
|
|
|
+ Margin="8,0" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel Margin="0,0,0,12" Orientation="Horizontal">
|
|
<StackPanel Margin="0,0,0,12" Orientation="Horizontal">
|
|
<RadioButton
|
|
<RadioButton
|
|
@@ -50,13 +100,15 @@
|
|
Width="80"
|
|
Width="80"
|
|
Height="32"
|
|
Height="32"
|
|
Margin="8,0"
|
|
Margin="8,0"
|
|
- VerticalAlignment="Center" />
|
|
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Text="{Binding CustomWidth, Mode=TwoWay}" />
|
|
<TextBlock VerticalAlignment="Center" Text="X" />
|
|
<TextBlock VerticalAlignment="Center" Text="X" />
|
|
<TextBox
|
|
<TextBox
|
|
Width="80"
|
|
Width="80"
|
|
Height="32"
|
|
Height="32"
|
|
Margin="8,0"
|
|
Margin="8,0"
|
|
- VerticalAlignment="Center" />
|
|
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Text="{Binding CustomHeight, Mode=TwoWay}" />
|
|
<ComboBox Width="80" />
|
|
<ComboBox Width="80" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
@@ -66,13 +118,31 @@
|
|
FontWeight="SemiBold"
|
|
FontWeight="SemiBold"
|
|
Text="方向" />
|
|
Text="方向" />
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Horizontal">
|
|
- <RadioButton Margin="0,12,0,16" Content="纵向页面" />
|
|
|
|
- <RadioButton Margin="24,12,0,16" Content="横向页面" />
|
|
|
|
|
|
+ <RadioButton
|
|
|
|
+ Margin="0,12,0,16"
|
|
|
|
+ Content="纵向页面"
|
|
|
|
+ IsChecked="True">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding OrientationCheckedCommand}" CommandParameter="Vertical" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
|
|
+ <RadioButton
|
|
|
|
+ Margin="24,12,0,16"
|
|
|
|
+ Content="横向页面"
|
|
|
|
+ Tag="Vertical">
|
|
|
|
+ <i:Interaction.Triggers>
|
|
|
|
+ <i:EventTrigger EventName="Checked">
|
|
|
|
+ <i:InvokeCommandAction Command="{Binding OrientationCheckedCommand}" CommandParameter="Horizontal" />
|
|
|
|
+ </i:EventTrigger>
|
|
|
|
+ </i:Interaction.Triggers>
|
|
|
|
+ </RadioButton>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
</cus:DialogContent.Content>
|
|
</cus:DialogContent.Content>
|
|
- <cus:DialogContent.BottmBar >
|
|
|
|
|
|
+ <cus:DialogContent.BottmBar>
|
|
<Grid>
|
|
<Grid>
|
|
<Button
|
|
<Button
|
|
Width="98"
|
|
Width="98"
|