Ver código fonte

复合控件 - 属性面板的复合控件移到CustomControl位置

chenrongqian 2 anos atrás
pai
commit
3aeabd2f9e

+ 3 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/ColorContent.xaml

@@ -1,16 +1,16 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls.ColorContent"
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.ColorContent"
              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.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../../Styles/CustomBtnStyle.xaml"/>
+                <ResourceDictionary Source="../../Styles/CustomBtnStyle.xaml"/>
             </ResourceDictionary.MergedDictionaries>
             <DataTemplate x:Key="listboxData">
                 <Ellipse Height="20" Width="20" Fill="{Binding Color}"/>

+ 1 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/ColorContent.xaml.cs

@@ -15,7 +15,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls
+namespace PDF_Office.CustomControl.CompositeControl
 {
     public class ColorItem: BindableBase
     {

+ 2 - 2
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContent.xaml

@@ -1,9 +1,9 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls.SlidContent"
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.SlidContent"
              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.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              mc:Ignorable="d" 
              d:DesignHeight="450" d:DesignWidth="800">

+ 1 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContent.xaml.cs

@@ -15,7 +15,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls
+namespace PDF_Office.CustomControl.CompositeControl
 {
     public class AdornerPresenter : Adorner
     {

+ 3 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContentPop.xaml

@@ -1,16 +1,16 @@
-<UserControl x:Class="PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls.SlidContentPop"
+<UserControl x:Class="PDF_Office.CustomControl.CompositeControl.SlidContentPop"
              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.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:local="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              mc:Ignorable="d" 
              x:Name="usercontorls"
              d:DesignHeight="450" d:DesignWidth="800">
     <UserControl.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
-                <ResourceDictionary Source="../../../../Styles/SliderStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Styles/SliderStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
         </ResourceDictionary>
 

+ 1 - 1
PDF Office/Views/PropertyPanel/AnnotPanel/CommonControls/SlidContentPop.xaml.cs

@@ -13,7 +13,7 @@ using System.Windows.Media.Imaging;
 using System.Windows.Navigation;
 using System.Windows.Shapes;
 
-namespace PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls
+namespace PDF_Office.CustomControl.CompositeControl
 {
     /// <summary>
     /// ThicknessContentPop.xaml 的交互逻辑

+ 6 - 6
PDF Office/PDF Office.csproj

@@ -604,10 +604,10 @@
     <Compile Include="Views\PageEdit\PageEditContent.xaml.cs">
       <DependentUpon>PageEditContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CommonControls\ColorContent.xaml.cs">
+    <Compile Include="CustomControl\CompositeControl\ColorContent.xaml.cs">
       <DependentUpon>ColorContent.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContentPop.xaml.cs">
+    <Compile Include="CustomControl\CompositeControl\SlidContentPop.xaml.cs">
       <DependentUpon>SlidContentPop.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\PropertyPanel\AnnotPanel\FreehandAnnotProperty.xaml.cs">
@@ -634,7 +634,7 @@
     <Compile Include="Views\PropertyPanel\AnnotPanel\TextEditProperty.xaml.cs">
       <DependentUpon>TextEditProperty.xaml</DependentUpon>
     </Compile>
-    <Compile Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContent.xaml.cs">
+    <Compile Include="CustomControl\CompositeControl\SlidContent.xaml.cs">
       <DependentUpon>SlidContent.xaml</DependentUpon>
     </Compile>
     <Compile Include="Views\PropertyPanel\PropertyPanelContent.xaml.cs">
@@ -943,7 +943,7 @@
     <Page Include="Views\Dialog\HomePageToolsDialogs\HomePagePrinter\HomePagePrinterDialog.xaml">
       <SubType>Designer</SubType>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CommonControls\ColorContent.xaml">
+    <Page Include="CustomControl\CompositeControl\ColorContent.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
@@ -959,7 +959,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContentPop.xaml">
+    <Page Include="CustomControl\CompositeControl\SlidContentPop.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
@@ -1031,7 +1031,7 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
-    <Page Include="Views\PropertyPanel\AnnotPanel\CommonControls\SlidContent.xaml">
+    <Page Include="CustomControl\CompositeControl\SlidContent.xaml">
       <Generator>MSBuild:Compile</Generator>
     </Page>
     <Page Include="Views\EditTools\Watermark\WatermarkTemplateListFileContent.xaml">

+ 4 - 4
PDF Office/Views/PropertyPanel/AnnotPanel/FreehandAnnotProperty.xaml

@@ -4,7 +4,7 @@
              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.PropertyPanel.AnnotPanel"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+              xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
               xmlns:cus="clr-namespace:PDF_Office.CustomControl"
               xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:prism="http://prismlibrary.com/"             
@@ -138,9 +138,9 @@
                         <RowDefinition Height="auto"/>
                         <RowDefinition/>
                     </Grid.RowDefinitions>
-                    <CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
-                    
-                    <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor"/>
+                    <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
+
+                    <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor"/>
                 </Grid>
 
                 <TextBlock x:Name="borderText" LineHeight="20" Margin="12,14,0,0" >Border</TextBlock>

+ 3 - 3
PDF Office/Views/PropertyPanel/AnnotPanel/FreetextAnnotProperty.xaml

@@ -4,7 +4,7 @@
              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.PropertyPanel.AnnotPanel"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+              xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:prism="http://prismlibrary.com/"             
              prism:ViewModelLocator.AutoWireViewModel="True"
@@ -283,8 +283,8 @@
                     <RowDefinition Height="auto"/>
                     <RowDefinition/>
                 </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor"/>
+                <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
+                <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor"/>
             </Grid>
 
 

+ 5 - 5
PDF Office/Views/PropertyPanel/AnnotPanel/SharpsAnnotProperty.xaml

@@ -5,7 +5,7 @@
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel"
              xmlns:cus="clr-namespace:PDF_Office.CustomControl"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+             xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:prism="http://prismlibrary.com/"             
              prism:ViewModelLocator.AutoWireViewModel="True"
@@ -129,8 +129,8 @@
                     <RowDefinition Height="auto"/>
                     <RowDefinition/>
                 </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="layerFill" HorizontalAlignment="Right"/>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusFillColor"/>
+                <CompositeControl:SlidContent x:Name="layerFill" HorizontalAlignment="Right"/>
+                <CompositeControl:ColorContent Grid.Row="1" x:Name="cusFillColor"/>
             </Grid>
 
             <Grid Margin="0,18,0,0">
@@ -138,8 +138,8 @@
                     <RowDefinition Height="auto"/>
                     <RowDefinition/>
                 </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor"/>
+                <CompositeControl:SlidContent x:Name="layerThick" HorizontalAlignment="Right"/>
+                <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor"/>
 
             </Grid>
 

+ 4 - 4
PDF Office/Views/PropertyPanel/AnnotPanel/TextAnnotProperty.xaml

@@ -4,7 +4,7 @@
              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.PropertyPanel.AnnotPanel"
-             xmlns:CommonControls="clr-namespace:PDF_Office.Views.PropertyPanel.AnnotPanel.CommonControls"
+              xmlns:CompositeControl="clr-namespace:PDF_Office.CustomControl.CompositeControl"
              xmlns:cus="clr-namespace:PDF_Office.CustomControl"
              xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
              xmlns:prism="http://prismlibrary.com/"             
@@ -63,14 +63,14 @@
                     <RowDefinition Height="auto"/>
                     <RowDefinition/>
                 </Grid.RowDefinitions>
-                <CommonControls:SlidContent x:Name="SlidOpacity" HorizontalAlignment="Right">
+                <CompositeControl:SlidContent x:Name="SlidOpacity" HorizontalAlignment="Right">
                     <!--<i:Interaction.Triggers>
                         <i:EventTrigger EventName="SelectedValueChanged">
                             <i:InvokeCommandAction Command="{Binding SelectedValueChangedCommand}"/>
                         </i:EventTrigger>
                     </i:Interaction.Triggers>-->
-                </CommonControls:SlidContent>
-                <CommonControls:ColorContent Grid.Row="1" x:Name="cusColor" />
+                </CompositeControl:SlidContent>
+                <CompositeControl:ColorContent Grid.Row="1" x:Name="cusColor" />
             </Grid>
 
         </StackPanel>