|
@@ -11,16 +11,56 @@
|
|
xmlns:model="clr-namespace:PDF_Master.Model.PageEdit"
|
|
xmlns:model="clr-namespace:PDF_Master.Model.PageEdit"
|
|
xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
|
|
xmlns:pageeditdialogs="clr-namespace:PDF_Master.ViewModels.Dialog.PageEditDialogs"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
- Width="380"
|
|
|
|
|
|
+ Width="468"
|
|
Height="350"
|
|
Height="350"
|
|
d:DataContext="{d:DesignInstance Type=pageeditdialogs:InsertDialogViewModel}"
|
|
d:DataContext="{d:DesignInstance Type=pageeditdialogs:InsertDialogViewModel}"
|
|
- d:DesignHeight="450"
|
|
|
|
- d:DesignWidth="800"
|
|
|
|
|
|
+ d:DesignHeight="350"
|
|
|
|
+ d:DesignWidth="468"
|
|
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>
|
|
<UserControl.Resources>
|
|
|
|
+
|
|
<ResourceDictionary>
|
|
<ResourceDictionary>
|
|
|
|
+ <Style x:Key="TextBoxStyle" TargetType="TextBox">
|
|
|
|
+ <Setter Property="Height" Value="32" />
|
|
|
|
+ <Setter Property="FontSize" Value="14" />
|
|
|
|
+ <Setter Property="Template">
|
|
|
|
+ <Setter.Value>
|
|
|
|
+ <ControlTemplate TargetType="TextBox">
|
|
|
|
+ <Border
|
|
|
|
+ x:Name="border"
|
|
|
|
+ Background="{TemplateBinding Background}"
|
|
|
|
+ BorderBrush="{TemplateBinding BorderBrush}"
|
|
|
|
+ BorderThickness="{TemplateBinding BorderThickness}"
|
|
|
|
+ CornerRadius="5"
|
|
|
|
+ SnapsToDevicePixels="True">
|
|
|
|
+ <!--<TextBox
|
|
|
|
+ Name="markText"
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ Background="Transparent"
|
|
|
|
+ BorderBrush="Transparent"
|
|
|
|
+ FontSize="12"
|
|
|
|
+ Text="{TemplateBinding Text}"
|
|
|
|
+ Visibility="Visible" />-->
|
|
|
|
+ </Border>
|
|
|
|
+
|
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
|
+ <Trigger Property="IsEnabled" Value="false">
|
|
|
|
+ <Setter TargetName="border" Property="Opacity" Value="0.56" />
|
|
|
|
+ <Setter TargetName="border" Property="Background" Value="{StaticResource color.field.bg.dis}" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsMouseOver" Value="true">
|
|
|
|
+ <Setter TargetName="border" Property="BorderBrush" Value="#FF7EB4EA" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ <Trigger Property="IsKeyboardFocused" Value="true">
|
|
|
|
+ <Setter TargetName="border" Property="BorderBrush" Value="#FF569DE5" />
|
|
|
|
+ </Trigger>
|
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
|
+ </ControlTemplate>
|
|
|
|
+ </Setter.Value>
|
|
|
|
+ </Setter>
|
|
|
|
+ </Style>
|
|
<convert:FileToImageSourceConvert x:Key="FileToImageSourceConvert" />
|
|
<convert:FileToImageSourceConvert x:Key="FileToImageSourceConvert" />
|
|
<DataTemplate x:Key="CustomItem" DataType="{x:Type model:CustomPageItem}">
|
|
<DataTemplate x:Key="CustomItem" DataType="{x:Type model:CustomPageItem}">
|
|
<StackPanel HorizontalAlignment="Center">
|
|
<StackPanel HorizontalAlignment="Center">
|
|
@@ -68,7 +108,8 @@
|
|
BorderThickness="0"
|
|
BorderThickness="0"
|
|
ItemTemplate="{StaticResource CustomItem}"
|
|
ItemTemplate="{StaticResource CustomItem}"
|
|
ItemsSource="{Binding Pages}"
|
|
ItemsSource="{Binding Pages}"
|
|
- SelectedIndex="{Binding ItemSelectedIndex, Mode=TwoWay}" Visibility="Hidden">
|
|
|
|
|
|
+ SelectedIndex="{Binding ItemSelectedIndex, Mode=TwoWay}"
|
|
|
|
+ Visibility="Hidden">
|
|
<ListBox.ItemContainerStyle>
|
|
<ListBox.ItemContainerStyle>
|
|
<Style TargetType="{x:Type ListBoxItem}">
|
|
<Style TargetType="{x:Type ListBoxItem}">
|
|
<Setter Property="Template" Value="{StaticResource ListBoxItemControlTemplate}" />
|
|
<Setter Property="Template" Value="{StaticResource ListBoxItemControlTemplate}" />
|
|
@@ -81,35 +122,42 @@
|
|
</ItemsPanelTemplate>
|
|
</ItemsPanelTemplate>
|
|
</ListBox.ItemsPanel>
|
|
</ListBox.ItemsPanel>
|
|
</ListBox>
|
|
</ListBox>
|
|
- <StackPanel Grid.Row="0" Margin="16,0">
|
|
|
|
|
|
+ <StackPanel Grid.Row="0" Margin="16,10">
|
|
<TextBlock
|
|
<TextBlock
|
|
- FontSize="14"
|
|
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="12"
|
|
FontWeight="SemiBold"
|
|
FontWeight="SemiBold"
|
|
|
|
+ Foreground="{StaticResource color.sys.text.neutral.lv2}"
|
|
Text="页面大小" />
|
|
Text="页面大小" />
|
|
<StackPanel
|
|
<StackPanel
|
|
- Margin="0,12,0,0"
|
|
|
|
|
|
+ Margin="0,10"
|
|
VerticalAlignment="Bottom"
|
|
VerticalAlignment="Bottom"
|
|
Orientation="Horizontal">
|
|
Orientation="Horizontal">
|
|
<RadioButton
|
|
<RadioButton
|
|
Height="32"
|
|
Height="32"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Content="当前页"
|
|
Content="当前页"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="14"
|
|
GroupName="PageSize"
|
|
GroupName="PageSize"
|
|
- IsEnabled="{Binding IsCurrentIsEnabled,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
- IsChecked="{Binding IsCurrentSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
|
+ IsChecked="{Binding IsCurrentSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
|
|
+ IsEnabled="{Binding IsCurrentIsEnabled, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Label
|
|
<Label
|
|
Height="32"
|
|
Height="32"
|
|
Margin="8,0"
|
|
Margin="8,0"
|
|
HorizontalAlignment="Center"
|
|
HorizontalAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Content="{Binding CurrentPageSize}"
|
|
Content="{Binding CurrentPageSize}"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
FontSize="14" />
|
|
FontSize="14" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- <StackPanel Margin="0,12" Orientation="Horizontal">
|
|
|
|
|
|
+ <StackPanel Margin="0,10" Orientation="Horizontal">
|
|
<RadioButton
|
|
<RadioButton
|
|
Name="RbtnStandard"
|
|
Name="RbtnStandard"
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="标准"
|
|
Content="标准"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="14"
|
|
GroupName="PageSize"
|
|
GroupName="PageSize"
|
|
IsChecked="{Binding IsStandSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
IsChecked="{Binding IsStandSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
<ComboBox
|
|
<ComboBox
|
|
@@ -120,30 +168,77 @@
|
|
ItemsSource="{Binding PageSize}"
|
|
ItemsSource="{Binding PageSize}"
|
|
SelectedIndex="{Binding PageSizeSelectedIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
SelectedIndex="{Binding PageSizeSelectedIndex, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
- <StackPanel Margin="0,0,0,12" Orientation="Horizontal">
|
|
|
|
|
|
+ <StackPanel Margin="0,10" Orientation="Horizontal">
|
|
<RadioButton
|
|
<RadioButton
|
|
Name="RbtnCustom"
|
|
Name="RbtnCustom"
|
|
VerticalAlignment="Center"
|
|
VerticalAlignment="Center"
|
|
Content="自定义"
|
|
Content="自定义"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="14"
|
|
GroupName="PageSize"
|
|
GroupName="PageSize"
|
|
IsChecked="{Binding IsCustomSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
IsChecked="{Binding IsCustomSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
+ <!--<TextBox
|
|
|
|
+ Width="94"
|
|
|
|
+ Height="32"
|
|
|
|
+ Margin="8,0"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
|
+ IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
|
|
+ Style="{StaticResource TextBoxStyle}"
|
|
|
|
+ Text="{Binding CustomWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />-->
|
|
<TextBox
|
|
<TextBox
|
|
- Width="80"
|
|
|
|
|
|
+ Width="94"
|
|
Height="32"
|
|
Height="32"
|
|
Margin="8,0"
|
|
Margin="8,0"
|
|
|
|
+ Padding="8,0"
|
|
|
|
+ HorizontalContentAlignment="Left"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
|
|
+ Background="{StaticResource color.field.bg.def}"
|
|
|
|
+ BorderBrush="{StaticResource color.field.border.norm}"
|
|
|
|
+ InputMethod.IsInputMethodEnabled="False"
|
|
IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
- Text="{Binding CustomWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
- <TextBlock VerticalAlignment="Center" Text="X" />
|
|
|
|
|
|
+ Text="{Binding CustomWidth, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
|
|
|
+ <TextBox.Resources>
|
|
|
|
+ <Style TargetType="{x:Type Border}">
|
|
|
|
+ <Setter Property="CornerRadius" Value="4" />
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ </Style>
|
|
|
|
+ </TextBox.Resources>
|
|
|
|
+ </TextBox>
|
|
|
|
+ <TextBlock
|
|
|
|
+ VerticalAlignment="Center"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ Text="X" />
|
|
|
|
+ <!--<TextBox
|
|
|
|
+ Width="80"
|
|
|
|
+ Height="32"
|
|
|
|
+ Margin="8,0"
|
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
|
+ IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
|
|
+ Text="{Binding CustomHeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />-->
|
|
<TextBox
|
|
<TextBox
|
|
- Width="80"
|
|
|
|
|
|
+ Width="94"
|
|
Height="32"
|
|
Height="32"
|
|
Margin="8,0"
|
|
Margin="8,0"
|
|
|
|
+ Padding="8,0"
|
|
|
|
+ HorizontalContentAlignment="Left"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
|
|
+ Background="{StaticResource color.field.bg.def}"
|
|
|
|
+ BorderBrush="{StaticResource color.field.border.norm}"
|
|
|
|
+ InputMethod.IsInputMethodEnabled="False"
|
|
IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
- Text="{Binding CustomHeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
|
|
|
|
+ Text="{Binding CustomHeight, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">
|
|
|
|
+ <TextBox.Resources>
|
|
|
|
+ <Style TargetType="{x:Type Border}">
|
|
|
|
+ <Setter Property="CornerRadius" Value="4" />
|
|
|
|
+ </Style>
|
|
|
|
+ </TextBox.Resources>
|
|
|
|
+ </TextBox>
|
|
<ComboBox
|
|
<ComboBox
|
|
- Width="80"
|
|
|
|
|
|
+ Width="94"
|
|
|
|
+ Margin="8,0"
|
|
VerticalContentAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
IsEnabled="{Binding ElementName=RbtnCustom, Path=IsChecked}"
|
|
ItemsSource="{Binding Units}"
|
|
ItemsSource="{Binding Units}"
|
|
@@ -152,22 +247,30 @@
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="1" Margin="16,0">
|
|
<StackPanel Grid.Row="1" Margin="16,0">
|
|
<TextBlock
|
|
<TextBlock
|
|
- FontSize="14"
|
|
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="12"
|
|
FontWeight="SemiBold"
|
|
FontWeight="SemiBold"
|
|
|
|
+ Foreground="{StaticResource color.sys.text.neutral.lv2}"
|
|
Text="方向" />
|
|
Text="方向" />
|
|
<StackPanel Orientation="Horizontal">
|
|
<StackPanel Orientation="Horizontal">
|
|
<RadioButton
|
|
<RadioButton
|
|
|
|
+ Width="86"
|
|
Margin="0,12,0,16"
|
|
Margin="0,12,0,16"
|
|
Content="纵向页面"
|
|
Content="纵向页面"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ GroupName="Direction"
|
|
IsChecked="{Binding IsVerticalSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsChecked="{Binding IsVerticalSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
- Tag="Vertical"
|
|
|
|
- GroupName="Direction"/>
|
|
|
|
|
|
+ Tag="Vertical" />
|
|
<RadioButton
|
|
<RadioButton
|
|
- Margin="24,12,0,16"
|
|
|
|
|
|
+ Width="86"
|
|
|
|
+ Margin="30,12,0,16"
|
|
Content="横向页面"
|
|
Content="横向页面"
|
|
|
|
+ FontFamily="Segoe UI"
|
|
|
|
+ FontSize="14"
|
|
|
|
+ GroupName="Direction"
|
|
IsChecked="{Binding IsHorizontalSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
IsChecked="{Binding IsHorizontalSelected, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
|
|
- Tag="Horizontal"
|
|
|
|
- GroupName="Direction"/>
|
|
|
|
|
|
+ Tag="Horizontal" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Grid>
|
|
@@ -191,4 +294,4 @@
|
|
</Grid>
|
|
</Grid>
|
|
</cus:DialogContent.BottmBar>
|
|
</cus:DialogContent.BottmBar>
|
|
</cus:DialogContent>
|
|
</cus:DialogContent>
|
|
-</UserControl>
|
|
|
|
|
|
+</UserControl>
|