Browse Source

Form - 更改颜色属性对话框

chenrongqian 2 năm trước cách đây
mục cha
commit
fed2537c5b

+ 7 - 0
PDF Office/PDF Office.csproj

@@ -677,6 +677,9 @@
     <Compile Include="Views\Form\ComboxProperty.xaml.cs">
       <DependentUpon>ComboxProperty.xaml</DependentUpon>
     </Compile>
+    <Compile Include="Views\Form\EditPresetColorsDialog.xaml.cs">
+      <DependentUpon>EditPresetColorsDialog.xaml</DependentUpon>
+    </Compile>
     <Compile Include="Views\Form\EmptyFormProperty.xaml.cs">
       <DependentUpon>EmptyFormProperty.xaml</DependentUpon>
     </Compile>
@@ -1231,6 +1234,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="Views\Form\EditPresetColorsDialog.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </Page>
     <Page Include="Views\Form\EmptyFormProperty.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 100 - 0
PDF Office/Views/Form/EditPresetColorsDialog.xaml

@@ -0,0 +1,100 @@
+<UserControl x:Class="PDF_Office.Views.Form.EditPresetColorsDialog"
+             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:PDF_Office.Views.Form"
+             xmlns:cus="clr-namespace:PDF_Office.CustomControl"
+             xmlns:cusColor="clr-namespace:PDF_Office.CustomControl.CompositeControl"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <cus:DialogContent Header="Edit Preset Colors" Width="468" Height="258">
+        <cus:DialogContent.Content>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="Auto"/>
+                    <ColumnDefinition/>
+                </Grid.ColumnDefinitions>
+
+                <Border Width="162" Height="144" BorderThickness="1" CornerRadius="8" Background="#F7F8FA">
+                    <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
+                        <TextBlock Text="Text"/>
+                    </Grid>
+                </Border>
+
+                <Grid Grid.Column="1" Height="144">
+                    <Grid.RowDefinitions>
+                        <RowDefinition  Height="*"/>
+                        <RowDefinition  Height="*"/>
+                        <RowDefinition  Height="*"/>
+                        <RowDefinition  Height="*"/>
+                    </Grid.RowDefinitions>
+
+                    <Grid.ColumnDefinitions>
+                        <ColumnDefinition />
+                        <ColumnDefinition Width="auto"/>
+                    </Grid.ColumnDefinitions>
+
+                    <TextBlock Text="Settings" Grid.ColumnSpan="2" VerticalAlignment="Center"/>
+                    <TextBlock Text="Border Color:" Grid.Row="1" VerticalAlignment="Center"/>
+                    <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="1">
+                        <cusColor:ColorSubContent x:Name="BorderColorBox" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+                                   ></cusColor:ColorSubContent>
+                    </StackPanel>
+
+                    <TextBlock Text="Background Color:" Grid.Row="2" VerticalAlignment="Center"/>
+                    <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="1">
+                        <cusColor:ColorSubContent x:Name="BgColorBox" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+                                   ></cusColor:ColorSubContent>
+                    </StackPanel>
+                    
+                    <TextBlock Text="Text Color:" Grid.Row="3" VerticalAlignment="Center"/>
+                    <StackPanel Orientation="Horizontal" Grid.Row="3" Grid.Column="1">
+                        <RadioButton Style="{StaticResource RectangleRadionButtonWithCorner}">
+                            <cusColor:ColorSubContent x:Name="TextColorBox" Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left"
+                                   ></cusColor:ColorSubContent>
+                        </RadioButton>
+                       
+                    </StackPanel>
+                </Grid>
+            </Grid>
+        </cus:DialogContent.Content>
+
+        <cus:DialogContent.BottmBar>
+            <Grid>
+                <Grid.ColumnDefinitions>
+                    <ColumnDefinition Width="50*" />
+                    <ColumnDefinition Width="50*" />
+                    <ColumnDefinition Width="50*" />
+                </Grid.ColumnDefinitions>
+                <Button
+                    Style="{StaticResource btn.sec}"
+                    Grid.Column="0"
+                    Width="150"
+                    Height="32"
+                    Margin="25,0,0,0"
+                    HorizontalAlignment="Right"
+                    Command="{Binding CreateCommnad}"
+                    Content="Reset Settings" />
+                <Button
+                    Style="{StaticResource Btn.cta}"
+                    Grid.Column="1"
+                    Width="150"
+                    Height="32"
+                    Margin="25,0,0,0"
+                    HorizontalAlignment="Right"
+                    Command="{Binding CreateCommnad}"
+                    Content="确定" />
+                <Button
+                    Style="{StaticResource btn.sec}"
+                    Grid.Column="2"
+                    Width="150"
+                    Height="32"
+                    Margin="0,0,25,0"
+                    HorizontalAlignment="Right"
+                    Command="{Binding CancelCommand}"
+                    Content="取消" />
+            </Grid>
+        </cus:DialogContent.BottmBar>
+    </cus:DialogContent>
+</UserControl>

+ 28 - 0
PDF Office/Views/Form/EditPresetColorsDialog.xaml.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace PDF_Office.Views.Form
+{
+    /// <summary>
+    /// EditPresetColorsDialog.xaml 的交互逻辑
+    /// </summary>
+    public partial class EditPresetColorsDialog : UserControl
+    {
+        public EditPresetColorsDialog()
+        {
+            InitializeComponent();
+        }
+    }
+}