Przeglądaj źródła

[新增]SKMC.UI.DesignApp项目,用于显示所有Icon和主要控件样式

Jiangsheng 2 tygodni temu
rodzic
commit
bbc8351349

+ 6 - 0
SKMC.UI.DesignApp/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
+    </startup>
+</configuration>

+ 15 - 0
SKMC.UI.DesignApp/App.xaml

@@ -0,0 +1,15 @@
+<prism:PrismApplication 
+             x:Class="SKMC.UI.DesignApp.App"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:local="clr-namespace:SKMC.UI.DesignApp"
+             xmlns:prism="http://prismlibrary.com/">
+    <prism:PrismApplication.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/Themes/Dark.xaml" />
+                <ResourceDictionary Source="pack://application:,,,/SKMC.UI;component/FrameWork.xaml" />
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </prism:PrismApplication.Resources>
+</prism:PrismApplication>

+ 32 - 0
SKMC.UI.DesignApp/App.xaml.cs

@@ -0,0 +1,32 @@
+using Prism.DryIoc;
+using Prism.Ioc;
+using SKMC.UI.DesignApp.ViewModels;
+using SKMC.UI.DesignApp.Views;
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace SKMC.UI.DesignApp
+{
+    /// <summary>
+    /// App.xaml 的交互逻辑
+    /// </summary>
+    public partial class App : PrismApplication
+    {
+        protected override Window CreateShell()
+        {
+            return new MainView();
+        }
+
+        protected override void RegisterTypes(IContainerRegistry containerRegistry)
+        {
+            containerRegistry.RegisterForNavigation<MainView, MainViewModel>("MainView");
+            containerRegistry.RegisterForNavigation<AllIconsView, AllIconsViewModel>();
+            containerRegistry.RegisterForNavigation<BasicControlsView, BasicControlsViewModel>();
+        }
+    }
+}

+ 15 - 0
SKMC.UI.DesignApp/Models/IconModel.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Media;
+
+namespace SKMC.UI.DesignApp.Models
+{
+    public class IconModel
+    {
+        public string Key { get; set; }
+        public Geometry Data { get; set; }
+    }
+}

+ 52 - 0
SKMC.UI.DesignApp/Properties/AssemblyInfo.cs

@@ -0,0 +1,52 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// 有关程序集的一般信息由以下
+// 控制。更改这些特性值可修改
+// 与程序集关联的信息。
+[assembly: AssemblyTitle("SKMC.UI.DesignApp")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("HP Inc.")]
+[assembly: AssemblyProduct("SKMC.UI.DesignApp")]
+[assembly: AssemblyCopyright("Copyright © HP Inc. 2026")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// 将 ComVisible 设置为 false 会使此程序集中的类型
+//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
+//请将此类型的 ComVisible 特性设置为 true。
+[assembly: ComVisible(false)]
+
+//若要开始生成可本地化的应用程序,请设置
+//.csproj 文件中的 <UICulture>CultureYouAreCodingWith</UICulture>
+//在 <PropertyGroup> 中。例如,如果你使用的是美国英语。
+//使用的是美国英语,请将 <UICulture> 设置为 en-US。  然后取消
+//对以下 NeutralResourceLanguage 特性的注释。  更新
+//以下行中的“en-US”以匹配项目文件中的 UICulture 设置。
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+    ResourceDictionaryLocation.None, //主题特定资源词典所处位置
+                                     //(未在页面中找到资源时使用,
+                                     //或应用程序资源字典中找到时使用)
+    ResourceDictionaryLocation.SourceAssembly //常规资源词典所处位置
+                                              //(未在页面中找到资源时使用,
+                                              //、应用程序或任何主题专用资源字典中找到时使用)
+)]
+
+
+// 程序集的版本信息由下列四个值组成: 
+//
+//      主版本
+//      次版本
+//      生成号
+//      修订号
+//
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
SKMC.UI.DesignApp/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     此代码由工具生成。
+//     运行时版本: 4.0.30319.42000
+//
+//     对此文件的更改可能导致不正确的行为,如果
+//     重新生成代码,则所做更改将丢失。
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SKMC.UI.DesignApp.Properties
+{
+
+
+    /// <summary>
+    ///   强类型资源类,用于查找本地化字符串等。
+    /// </summary>
+    // 此类是由 StronglyTypedResourceBuilder
+    // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
+    // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
+    // (以 /str 作为命令选项),或重新生成 VS 项目。
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources
+    {
+
+        private static global::System.Resources.ResourceManager resourceMan;
+
+        private static global::System.Globalization.CultureInfo resourceCulture;
+
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources()
+        {
+        }
+
+        /// <summary>
+        ///   返回此类使用的缓存 ResourceManager 实例。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager
+        {
+            get
+            {
+                if ((resourceMan == null))
+                {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SKMC.UI.DesignApp.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+
+        /// <summary>
+        ///   重写当前线程的 CurrentUICulture 属性,对
+        ///   使用此强类型资源类的所有资源查找执行重写。
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture
+        {
+            get
+            {
+                return resourceCulture;
+            }
+            set
+            {
+                resourceCulture = value;
+            }
+        }
+    }
+}

+ 117 - 0
SKMC.UI.DesignApp/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
SKMC.UI.DesignApp/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.42000
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SKMC.UI.DesignApp.Properties
+{
+
+
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+    {
+
+        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+        public static Settings Default
+        {
+            get
+            {
+                return defaultInstance;
+            }
+        }
+    }
+}

+ 7 - 0
SKMC.UI.DesignApp/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 139 - 0
SKMC.UI.DesignApp/SKMC.UI.DesignApp.csproj

@@ -0,0 +1,139 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{266AD87C-F88B-44DD-B5FD-9A3271325424}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>SKMC.UI.DesignApp</RootNamespace>
+    <AssemblyName>SKMC.UI.DesignApp</AssemblyName>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+    <WarningLevel>4</WarningLevel>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>x64</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="DryIoc, Version=4.7.7.0, Culture=neutral, PublicKeyToken=dfbf2bd50fcf7768, processorArchitecture=MSIL">
+      <HintPath>..\packages\DryIoc.dll.4.7.7\lib\net45\DryIoc.dll</HintPath>
+    </Reference>
+    <Reference Include="Microsoft.Xaml.Behaviors, Version=1.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
+      <HintPath>..\packages\Microsoft.Xaml.Behaviors.Wpf.1.1.31\lib\net45\Microsoft.Xaml.Behaviors.dll</HintPath>
+    </Reference>
+    <Reference Include="Prism, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
+      <HintPath>..\packages\Prism.Core.8.1.97\lib\net47\Prism.dll</HintPath>
+    </Reference>
+    <Reference Include="Prism.DryIoc.Wpf, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
+      <HintPath>..\packages\Prism.DryIoc.8.1.97\lib\net47\Prism.DryIoc.Wpf.dll</HintPath>
+    </Reference>
+    <Reference Include="Prism.Wpf, Version=8.1.97.5141, Culture=neutral, PublicKeyToken=40ee6c3a2184dc59, processorArchitecture=MSIL">
+      <HintPath>..\packages\Prism.Wpf.8.1.97\lib\net47\Prism.Wpf.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Configuration" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Xaml">
+      <RequiredTargetFramework>4.0</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="WindowsBase" />
+    <Reference Include="PresentationCore" />
+    <Reference Include="PresentationFramework" />
+  </ItemGroup>
+  <ItemGroup>
+    <ApplicationDefinition Include="App.xaml">
+      <Generator>MSBuild:Compile</Generator>
+      <SubType>Designer</SubType>
+    </ApplicationDefinition>
+    <Compile Include="Models\IconModel.cs" />
+    <Compile Include="ViewModels\AllIconsViewModel.cs" />
+    <Compile Include="ViewModels\BasicControlsViewModel.cs" />
+    <Compile Include="ViewModels\MainViewModel.cs" />
+    <Compile Include="Views\AllIconsView.xaml.cs">
+      <DependentUpon>AllIconsView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\BasicControlsView.xaml.cs">
+      <DependentUpon>BasicControlsView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="Views\MainView.xaml.cs">
+      <DependentUpon>MainView.xaml</DependentUpon>
+    </Compile>
+    <Compile Include="App.xaml.cs">
+      <DependentUpon>App.xaml</DependentUpon>
+      <SubType>Code</SubType>
+    </Compile>
+    <Page Include="Views\AllIconsView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\BasicControlsView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+    <Page Include="Views\MainView.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Properties\AssemblyInfo.cs">
+      <SubType>Code</SubType>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+    </EmbeddedResource>
+    <None Include="packages.config" />
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\SKMC.UI\SKMC.UI.csproj">
+      <Project>{51942c87-f99a-4da2-af63-9617cfffcf2b}</Project>
+      <Name>SKMC.UI</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 40 - 0
SKMC.UI.DesignApp/ViewModels/AllIconsViewModel.cs

@@ -0,0 +1,40 @@
+using DryIoc;
+using Prism.Mvvm;
+using SKMC.UI.DesignApp.Models;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
+
+namespace SKMC.UI.DesignApp.ViewModels
+{
+    public class AllIconsViewModel : BindableBase
+    {
+        public ObservableCollection<IconModel> Icons { get; set; } = new ObservableCollection<IconModel>();
+        public AllIconsViewModel()
+        {
+            LoadAllIcons();
+        }
+        private void LoadAllIcons()
+        {
+            var resourceDict = Application.Current.Resources;
+            var frameworkDictionaries = resourceDict.MergedDictionaries.FirstOrDefault(d => d.Source != null &&
+                                    d.Source.OriginalString.Contains("/FrameWork.xaml"));
+            var iconDictionaries = frameworkDictionaries.MergedDictionaries.FirstOrDefault(d => d.Source != null &&
+                                    d.Source.OriginalString.Contains("/Assets/Icons.xaml"));
+            foreach (var key in iconDictionaries.Keys)
+            {
+                var value = resourceDict[key];
+                // 只取 GeometryGroup 或 PathGeometry 类型
+                if (value is Geometry geometry && key is string stringKey)
+                {
+                    Icons.Add(new IconModel { Key = stringKey, Data = geometry });
+                }
+            }
+        }
+    }
+}

+ 13 - 0
SKMC.UI.DesignApp/ViewModels/BasicControlsViewModel.cs

@@ -0,0 +1,13 @@
+using Prism.Mvvm;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SKMC.UI.DesignApp.ViewModels
+{
+    public class BasicControlsViewModel : BindableBase
+    {
+    }
+}

+ 31 - 0
SKMC.UI.DesignApp/ViewModels/MainViewModel.cs

@@ -0,0 +1,31 @@
+using DryIoc;
+using Prism.Commands;
+using Prism.Mvvm;
+using Prism.Regions;
+using SKMC.UI.DesignApp.Views;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SKMC.UI.DesignApp.ViewModels
+{
+    public class MainViewModel : BindableBase
+    {
+        public IRegionManager RegionManager { get; private set; }
+        public DelegateCommand<string> RequestNavigateViewCommand { get; private set; }
+        public MainViewModel(IRegionManager regionManager)
+        {
+            RegionManager = regionManager;
+            regionManager.RegisterViewWithRegion("MainViewTapRegion", "AllIconsView");
+            regionManager.RegisterViewWithRegion("MainViewTapRegion", "BasicControlsView");
+            RequestNavigateViewCommand = new DelegateCommand<string>(RequestNavigateView);
+        }
+
+        private void RequestNavigateView(string obj)
+        {
+            RegionManager.RequestNavigate("MainViewTapRegion", obj);
+        }
+    }
+}

+ 53 - 0
SKMC.UI.DesignApp/Views/AllIconsView.xaml

@@ -0,0 +1,53 @@
+<UserControl x:Class="SKMC.UI.DesignApp.Views.AllIconsView"
+             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:SKMC.UI.DesignApp.Views"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800">
+    <Grid>
+        <ScrollViewer Style="{StaticResource ScrollViewer.Default}"
+                      HorizontalScrollBarVisibility="Disabled">
+            <ItemsControl ItemsSource="{Binding Icons}"
+                          HorizontalAlignment="Center"
+                          VerticalAlignment="Center"
+                          Margin="3">
+                <ItemsControl.ItemsPanel>
+                    <ItemsPanelTemplate>
+                        <WrapPanel />
+                    </ItemsPanelTemplate>
+                </ItemsControl.ItemsPanel>
+
+                <ItemsControl.ItemTemplate>
+                    <DataTemplate>
+                        <Border Margin="2" Background="{StaticResource Brush.PreviewBackground}"
+                                Width="205"
+                                Height="120">
+                            <Grid ToolTip="{Binding Key}">
+                                <Grid.RowDefinitions>
+                                    <RowDefinition Height="*"/>
+                                    <RowDefinition Height="auto"/>
+                                </Grid.RowDefinitions>
+                                <Path Data="{Binding Data}" 
+                                      Width="40" Height="40" 
+                                      Stretch="Uniform"
+                                      Stroke="{StaticResource Brush.Text}" 
+                                      HorizontalAlignment="Center"
+                                      VerticalAlignment="Center"
+                                      StrokeThickness="1.2"/>
+                                <TextBlock Grid.Row="1" Text="{Binding Key}" 
+                                           FontSize="{StaticResource FontSize.Label}" 
+                                           HorizontalAlignment="Center" 
+                                           Foreground="{StaticResource Brush.Text}"
+                                           Margin="0 0 0 5"/>
+                            </Grid>
+                        </Border>
+                    </DataTemplate>
+                </ItemsControl.ItemTemplate>
+            </ItemsControl>
+        </ScrollViewer>
+    </Grid>
+</UserControl>

+ 28 - 0
SKMC.UI.DesignApp/Views/AllIconsView.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 SKMC.UI.DesignApp.Views
+{
+    /// <summary>
+    /// AllIconsView.xaml 的交互逻辑
+    /// </summary>
+    public partial class AllIconsView : UserControl
+    {
+        public AllIconsView()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 229 - 0
SKMC.UI.DesignApp/Views/BasicControlsView.xaml

@@ -0,0 +1,229 @@
+<UserControl x:Class="SKMC.UI.DesignApp.Views.BasicControlsView"
+             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:SKMC.UI.DesignApp.Views"
+             xmlns:c="clr-namespace:SKMC.UI.CustomControls;assembly=SKMC.UI"
+             xmlns:u="clr-namespace:SKMC.UI.UserControls;assembly=SKMC.UI"
+             xmlns:prism="http://prismlibrary.com/"
+             prism:ViewModelLocator.AutoWireViewModel="True"
+             mc:Ignorable="d" 
+             d:DesignHeight="800" d:DesignWidth="1000">
+    <Grid>
+        <Border Style="{StaticResource Border.Base}"
+                Background="Transparent">
+            <StackPanel Orientation="Horizontal" Margin="3">
+                <StackPanel HorizontalAlignment="Left">
+                    <Button Style="{StaticResource Button.Base}"
+                        Content="Button.Base"/>
+                    <Button Style="{StaticResource Button.Primary}"
+                        Content="Button.Primary"/>
+                    <Button Style="{StaticResource Button.Secondary}"
+                        Content="Button.Secondary"/>
+                    <Button Style="{StaticResource Button.Debug}"
+                        Content="Button.Debug"/>
+                    <Button Style="{StaticResource Button.WindowControl}"
+                        Content="{StaticResource Icon.Minimize}"
+                        ToolTip="Button.WindowControl Content = Icon.Minimize"/>
+                    <Button Style="{StaticResource Button.WindowControl}"
+                        Content="{StaticResource Icon.Maximize}"
+                        ToolTip="Button.WindowControl Content = Icon.Maximize"/>
+                    <Button Style="{StaticResource Button.WindowControl}"
+                        Content="{StaticResource Icon.Restore}"
+                        ToolTip="Button.WindowControl Content = Icon.Restore"/>
+                    <Button Style="{StaticResource Button.WindowControl}"
+                        Content="{StaticResource Icon.Close}"
+                        ToolTip="Button.WindowControl Content = Icon.Close"/>
+                    <Button Style="{StaticResource Button.SimpleIcon}"
+                        Content="{StaticResource Icon.Home}"
+                        ToolTip="Button.SimpleIcon Content = Icon.Home FontSize = 45"
+                        Height="50"
+                        Width="50"
+                        FontSize="35"/>
+                    <c:SKButton Style="{StaticResource Button.WithIcon}"
+                            Content="Button.WithIcon" Width="160"
+                            Icon="{StaticResource Icon.HomePosition}"
+                            FontSize="15"
+                            ToolTip="SKMC.UI.CustomControls.SKButton"/>
+                    <ToggleButton Style="{StaticResource ToggleButton.Base}" Margin="5"
+                                  Content="ToggleButton.Base" Width="180"/>
+                    <ToggleButton Style="{StaticResource ToggleButton.Primary}" Margin="5"
+                                  Content="ToggleButton.Primary" Width="180"/>
+                    <ToggleButton Style="{StaticResource ToggleButton.SimpleLamp}" Margin="5"
+                                  Content="ToggleButton.SimpleLamp" Width="180"
+                                  Height="40"
+                                  FontSize="12"/>
+                    <ToggleButton Style="{StaticResource ToggleButton.SimpleLocker}" Margin="5"
+                                  Content="ToggleButton.SimpleLocker" Width="60" Height="60"
+                                  FontSize="45"/>
+                    <ToggleButton Style="{StaticResource ToggleButton.ThemeSwitch}" Margin="5"
+                                  Content="ToggleButton.ThemeSwitch" Width="60" Height="60"
+                                  FontSize="45"/>
+                </StackPanel>
+                <StackPanel Margin="3">
+                    <ComboBox Style="{StaticResource ComboBox.Primary}"
+                              Height="30" Width="180" Text="ComboBox.Primary">
+                        <ComboBoxItem>ComboBox.Primary</ComboBoxItem>
+                        <ComboBoxItem>ComboBox.Primary</ComboBoxItem>
+                        <ComboBoxItem>ComboBox.Primary</ComboBoxItem>
+                    </ComboBox>
+                    <DatePicker Style="{StaticResource DatePicker.Primary}"
+                                ToolTip="DatePicker.Primary"
+                                Margin="5"
+                                Width="150"/>
+                    <PasswordBox Style="{StaticResource PasswordBox.Base}"
+                                 ToolTip="PasswordBox.Base"/>
+                    <RadioButton Style="{StaticResource RadioButton.Base}"
+                                 Content="RadioButton.Base"
+                                 Margin="5"/>
+                    <RadioButton Style="{StaticResource RadioButton.Base}"
+                                 Content="RadioButton.Base"
+                                 Margin="5"/>
+                    <RadioButton Style="{StaticResource RadioButton.Primary}"
+                                 Content="RadioButton.Base"
+                                 Margin="5"
+                                 Width="150"
+                                 FontSize="15"/>
+                    <c:SKRadioButton Style="{StaticResource RadioButton.SystemMenu}"
+                                     Content="RadioButton.SystemMenu"
+                                     Margin="5"
+                                     Icon="{StaticResource Icon.Home}"
+                                     FontSize="13"/>
+                    <c:SKTextBox Icon="{StaticResource Icon.MagnifyingGlass}"
+                                 Text="TextBox.Primary"
+                                 Style="{StaticResource TextBox.Primary}"
+                                 Margin="5"
+                                 Height="40"
+                                 Width="180"
+                                 ToolTip="SKTextBox"/>
+                    <c:SKTextBox Text="TextBox.Primary"
+                                 Style="{StaticResource TextBox.Primary}"
+                                 Margin="5"
+                                 Height="40"
+                                 ToolTip="SKTextBox"
+                                 Unit="mm/s²"
+                                 Width="180"/>
+                    <c:SKTextBox Text="TextBox.Primary"
+                                 Style="{StaticResource TextBox.Primary}"
+                                 Margin="5"
+                                 Height="40"
+                                 Width="180"
+                                 ToolTip="SKTextBox"
+                                 Unit="mm/s²"
+                                 NumpadActivity="True"/>
+                    <TextBox Style="{StaticResource TextBox.SimpleWatermark}"
+                             Height="40"
+                             Margin="5"
+                             Width="180"
+                             Tag="TextBox.SimpleWatermark"/>
+                    <TextBox Style="{StaticResource TextBox.Base}"
+                             Height="40"
+                             Margin="5"
+                             Width="180"/>
+                </StackPanel>
+                <StackPanel>
+                    <DataGrid Style="{StaticResource DataGrid.Primary}"
+                              Width="500"
+                              Height="400"
+                              CanUserResizeColumns="True"
+                              ScrollViewer.HorizontalScrollBarVisibility="Visible"
+                              ScrollViewer.VerticalScrollBarVisibility="Visible">
+                        <DataGrid.Columns>
+                            <DataGridTextColumn
+                                Width="0.2*"
+                                Header="Id" 
+                                IsReadOnly="True"/>
+                            <DataGridTextColumn
+                                Width="0.5*"
+                                Header="Name" 
+                                IsReadOnly="True"/>
+                            <DataGridTextColumn
+                                Width="0.3*"
+                                Header="Time" 
+                                IsReadOnly="True"/>
+                            <DataGridTextColumn
+                                Width="0.3*"
+                                Header="Level" 
+                                IsReadOnly="True"/>
+                            <DataGridTextColumn
+                                Width="*"
+                                Header="Message" 
+                                IsReadOnly="True"/>
+                        </DataGrid.Columns>
+                    </DataGrid>
+                    <ListView
+                        Grid.Row="0"
+                        Grid.ColumnSpan="2"
+                        Margin="0,5,0,0"
+                        BorderThickness="1"
+                        Style="{StaticResource ListView.Primary}"
+                        Width="500"
+                        Height="400"
+                        ScrollViewer.VerticalScrollBarVisibility="Visible"
+                        ScrollViewer.HorizontalScrollBarVisibility="Visible">
+                        <ListView.View>
+                            <GridView ColumnHeaderContainerStyle="{StaticResource ListView.ColumnHeader}">
+                                <GridViewColumn Width="70" Header="Id">
+                                    <GridViewColumn.CellTemplate>
+                                        <DataTemplate>
+                                            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                                <TextBlock
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center"/>
+                                            </Border>
+                                        </DataTemplate>
+                                    </GridViewColumn.CellTemplate>
+                                </GridViewColumn>
+
+                                <GridViewColumn Width="70" Header="Name">
+                                    <GridViewColumn.CellTemplate>
+                                        <DataTemplate>
+                                            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                                <TextBlock
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center"/>
+                                            </Border>
+                                        </DataTemplate>
+                                    </GridViewColumn.CellTemplate>
+                                </GridViewColumn>
+                                <GridViewColumn Width="200" Header="Catalog">
+                                    <GridViewColumn.CellTemplate>
+                                        <DataTemplate>
+                                            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                                <TextBlock
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center"/>
+                                            </Border>
+                                        </DataTemplate>
+                                    </GridViewColumn.CellTemplate>
+                                </GridViewColumn>
+                                <GridViewColumn Width="120" Header="Value">
+                                    <GridViewColumn.CellTemplate>
+                                        <DataTemplate>
+                                            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                                <TextBox Foreground="Blue"/>
+                                            </Border>
+                                        </DataTemplate>
+                                    </GridViewColumn.CellTemplate>
+                                </GridViewColumn>
+                                <GridViewColumn Width="120" Header="Commet">
+                                    <GridViewColumn.CellTemplate>
+                                        <DataTemplate>
+                                            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                                <TextBlock
+                                                    HorizontalAlignment="Center"
+                                                    VerticalAlignment="Center"
+                                                    Foreground="Green" />
+                                            </Border>
+                                        </DataTemplate>
+                                    </GridViewColumn.CellTemplate>
+                                </GridViewColumn>
+                            </GridView>
+                        </ListView.View>
+                    </ListView>
+                </StackPanel>
+            </StackPanel>
+        </Border>
+    </Grid>
+</UserControl>

+ 28 - 0
SKMC.UI.DesignApp/Views/BasicControlsView.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 SKMC.UI.DesignApp.Views
+{
+    /// <summary>
+    /// BasicControlsView.xaml 的交互逻辑
+    /// </summary>
+    public partial class BasicControlsView : UserControl
+    {
+        public BasicControlsView()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 38 - 0
SKMC.UI.DesignApp/Views/MainView.xaml

@@ -0,0 +1,38 @@
+<Window x:Class="SKMC.UI.DesignApp.Views.MainView"
+        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:SKMC.UI.DesignApp.Views"
+        xmlns:prism="http://prismlibrary.com/"
+        prism:ViewModelLocator.AutoWireViewModel="True"
+        mc:Ignorable="d"
+        Title="SKMC.UI.DesignApp" Height="800" Width="1200"
+        Background="{StaticResource Brush.DarkBackground}">
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="auto"/>
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <Border Background="{StaticResource Brush.Background}">
+            <StackPanel Orientation="Horizontal">
+                <RadioButton Style="{StaticResource RadioButton.Primary}"
+                             Width="120"
+                             Height="45"
+                             Content="All Icons"
+                             IsChecked="True"
+                             Command="{Binding RequestNavigateViewCommand}"
+                             CommandParameter="AllIconsView"/>
+                <RadioButton Style="{StaticResource RadioButton.Primary}"
+                             Width="120"
+                             Height="45"
+                             Content="Basic Controls"
+                             Command="{Binding RequestNavigateViewCommand}"
+                             CommandParameter="BasicControlsView"/>
+            </StackPanel>
+        </Border>
+        <Border Grid.Row="1">
+            <ContentControl prism:RegionManager.RegionName="MainViewTapRegion"/>
+        </Border>
+    </Grid>
+</Window>

+ 27 - 0
SKMC.UI.DesignApp/Views/MainView.xaml.cs

@@ -0,0 +1,27 @@
+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.Shapes;
+
+namespace SKMC.UI.DesignApp.Views
+{
+    /// <summary>
+    /// MainView.xaml 的交互逻辑
+    /// </summary>
+    public partial class MainView : Window
+    {
+        public MainView()
+        {
+            InitializeComponent();
+        }
+    }
+}

+ 8 - 0
SKMC.UI.DesignApp/packages.config

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="DryIoc.dll" version="4.7.7" targetFramework="net48" />
+  <package id="Microsoft.Xaml.Behaviors.Wpf" version="1.1.31" targetFramework="net48" />
+  <package id="Prism.Core" version="8.1.97" targetFramework="net48" />
+  <package id="Prism.DryIoc" version="8.1.97" targetFramework="net48" />
+  <package id="Prism.Wpf" version="8.1.97" targetFramework="net48" />
+</packages>

+ 8 - 2
SKMC.UI.sln

@@ -1,10 +1,12 @@
 
 Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.36227.6
+# Visual Studio Version 18
+VisualStudioVersion = 18.9.12105.275 stable
 MinimumVisualStudioVersion = 10.0.40219.1
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SKMC.UI", "SKMC.UI\SKMC.UI.csproj", "{51942C87-F99A-4DA2-AF63-9617CFFFCF2B}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SKMC.UI.DesignApp", "SKMC.UI.DesignApp\SKMC.UI.DesignApp.csproj", "{266AD87C-F88B-44DD-B5FD-9A3271325424}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -15,6 +17,10 @@ Global
 		{51942C87-F99A-4DA2-AF63-9617CFFFCF2B}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{51942C87-F99A-4DA2-AF63-9617CFFFCF2B}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{51942C87-F99A-4DA2-AF63-9617CFFFCF2B}.Release|Any CPU.Build.0 = Release|Any CPU
+		{266AD87C-F88B-44DD-B5FD-9A3271325424}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{266AD87C-F88B-44DD-B5FD-9A3271325424}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{266AD87C-F88B-44DD-B5FD-9A3271325424}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{266AD87C-F88B-44DD-B5FD-9A3271325424}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 4 - 2
SKMC.UI/Assets/Icons.xaml

@@ -1276,6 +1276,8 @@
     <PathGeometry x:Key="Icon.Debug" Figures="M547.707 374.32V48.181c0-19.707-16-35.682-35.707-35.682s-35.707 15.975-35.707 35.682V374.32c-61.412 15.926-107.021 71.241-107.021 137.679 0 66.439 45.61 121.778 107.021 137.706v325.114c0 20.268 16 36.683 35.707 36.683s35.707-16.415 35.707-36.707v-325.14c61.413-15.902 107.021-71.267 107.021-137.681 0.001-66.436-45.608-121.728-107.021-137.654zM189.91 730.824c0.244-1.61 0.976-3.073 0.976-4.757V48.181c0-19.707-15.951-35.682-35.707-35.682-19.658 0-35.609 15.975-35.609 35.682v677.886c0 1.684 0.683 3.146 0.927 4.757-63.413 15.779-107.9 72.656-107.998 137.972 0 78.804 63.901 142.705 142.68 142.705 78.828 0 142.729-63.901 142.729-142.705-0.098-65.316-44.585-122.192-107.998-137.972z m-34.731 209.313c-39.365 0-71.315-31.976-71.315-71.39s31.951-71.339 71.364-71.339c39.414 0 71.364 31.95 71.364 71.388 0 39.414-31.95 71.364-71.413 71.341z m856.322-784.934c0-78.803-63.901-142.704-142.729-142.704-78.778 0-142.729 63.901-142.729 142.704 0.146 65.315 44.633 122.191 107.997 137.997-0.194 1.585-0.927 3.073-0.927 4.731v677.912c0 19.682 15.951 35.658 35.658 35.658s35.657-15.977 35.657-35.658V297.931c0-1.658-0.731-3.146-0.927-4.731 63.415-15.805 107.902-72.681 108-137.997z m-142.729 71.363c-39.414 0-71.364-31.974-71.364-71.388s31.999-71.364 71.413-71.34c39.414 0 71.364 31.95 71.364 71.364 0.001 39.439-31.998 71.39-71.413 71.364z" />
     <PathGeometry x:Key="Icon.Moon" Figures="M901.12 593.408c-5.632 0-11.264 1.536-16.384 4.096-45.056 22.016-95.744 34.304-149.504 34.304-189.44 0-343.04-153.6-343.04-343.04 0-50.688 11.264-99.328 31.232-142.848 2.048-4.608 3.072-9.216 3.072-14.336 0-18.944-15.36-34.304-34.304-34.304-5.12 0-10.24 1.024-14.336 3.072C213.504 160.768 95.744 318.464 95.744 503.808c0 237.056 192.512 429.568 429.568 429.568 189.44 0 350.208-122.88 407.552-292.864 1.536-4.096 2.56-8.192 2.56-12.8 0-18.944-15.36-34.304-34.304-34.304zM549.888 869.376C320 869.376 163.84 712.192 163.84 483.328c0-119.296 45.056-205.824 164.864-280.064 3.072-1.536 6.144-3.072 9.728-4.096-1.536 3.072-2.56 6.656-3.584 9.728-9.728 49.664-8.704 68.096-6.656 102.912 17.92 243.712 208.384 387.584 400.896 387.584 16.896 0 76.288-9.728 108.544-15.36 3.584-1.536 6.656-2.56 10.24-4.096-1.536 3.072-2.56 6.656-4.096 9.728-40.448 74.24-163.84 179.712-293.888 179.712z m268.8-741.888l-26.624 79.36 50.176 67.072-83.968-1.024-48.128 68.608-25.088-79.872-79.872-25.088 68.608-48.128-1.536-83.968 67.584 50.176z" />
     <PathGeometry x:Key="Icon.Sun" Figures="M512.1 801.5c-158.1 0-289.8-131.7-289.8-289.8S354 221.8 512.1 221.8s289.8 131.7 289.8 289.8-131.7 289.9-289.8 289.9z m0-52.7c131.7 0 237.1-105.4 237.1-237.1S643.9 274.5 512.1 274.5 275 379.9 275 511.7s105.4 237.1 237.1 237.1zM485.8 63.7h52.7v105.4h-52.7V63.7z m0 790.5h52.7v105.4h-52.7V854.2zM960 485.3V538H854.6v-52.7H960z m-790.4 0V538H64.2v-52.7h105.4z m642.9-310.9l36.9 36.9-73.8 73.8-36.9-36.9 73.8-73.8zM253.9 733l36.9 36.9-73.8 73.7-36.9-36.9 73.8-73.7z m595.5 79l-36.9 36.9-73.8-73.8 36.9-36.9 73.8 73.8zM290.8 253.4l-36.9 36.9-79-79 36.9-36.9 79 79z" />
-
-
+    <GeometryGroup x:Key="Icon.Save">
+        <PathGeometry Figures="M960 166.4L798.4 17.6l-4.8-4.8C785.6 4.8 768 0 755.2 0H107.2c-33.6 0-64 30.4-64 64v896c0 33.6 30.4 64 64 64H916.8c33.6 0 64-30.4 64-64V212.8c0-16-8-33.6-20.8-46.4zM640 84.8v84.8H299.2V84.8H640zM340.8 939.2V640h340.8v299.2H340.8z m555.2 0h-128v-320c0-33.6-30.4-64-64-64H320c-33.6 0-64 30.4-64 64v320H128V84.8h84.8V192c0 33.6 30.4 64 64 64h384c33.6 0 64-30.4 64-64V84.8h20.8l148.8 136v718.4z" />
+        <PathGeometry Figures="M596.8 683.2H427.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-27.2-19.2-43.2-44.8-43.2zM596.8 811.2H427.2c-25.6 0-43.2 17.6-43.2 43.2s17.6 43.2 43.2 43.2h171.2c25.6 0 43.2-17.6 43.2-43.2-1.6-27.2-19.2-43.2-44.8-43.2z" />
+    </GeometryGroup>
 </ResourceDictionary>

+ 87 - 0
SKMC.UI/Styles/TextBox.xaml

@@ -191,4 +191,91 @@
             </Setter.Value>
         </Setter>
     </Style>
+    <!--  基本文本框  -->
+    <Style x:Key="TextBox.Base" TargetType="{x:Type TextBox}">
+        <Style.Setters>
+            <Setter Property="VerticalContentAlignment" Value="Center" />
+            <Setter Property="HorizontalContentAlignment" Value="Center" />
+            <Setter Property="VerticalAlignment" Value="Stretch" />
+            <Setter Property="HorizontalAlignment" Value="Stretch" />
+            <Setter Property="BorderThickness" Value="1" />
+            <Setter Property="FontSize" Value="12" />
+            <Setter Property="Background" Value="{DynamicResource Brush.PreviewBackground}"/>
+            <Setter Property="Foreground" Value="{DynamicResource Brush.Text}" />
+            <Setter Property="FontFamily" Value="{DynamicResource FontFamily.Global}"/>
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="{x:Type TextBox}">
+                        <Border
+                            x:Name="boder"
+                            Background="{Binding Background, RelativeSource={RelativeSource TemplatedParent}}"
+                            BorderThickness="{TemplateBinding BorderThickness}"
+                            CornerRadius="{Binding CornerRadius, RelativeSource={RelativeSource TemplatedParent}}">
+                            <FrameworkElement.Style>
+                                <Style TargetType="{x:Type Border}">
+                                    <Setter Property="BorderBrush" Value="{DynamicResource Brush.Border}" />
+                                    <Style.Triggers>
+                                        <DataTrigger Binding="{Binding IsFocused, ElementName=TextBox}" Value="True">
+                                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.Signature}" />
+                                        </DataTrigger>
+                                        <DataTrigger Binding="{Binding IsEnabled, ElementName=TextBox}" Value="False">
+                                            <Setter Property="BorderBrush" Value="{DynamicResource Brush.IconInactive}" />
+                                        </DataTrigger>
+                                    </Style.Triggers>
+                                </Style>
+                            </FrameworkElement.Style>
+                            <!--  输入框  -->
+                            <TextBox
+                                    Name="TextBox"
+                                    HorizontalAlignment="Stretch"
+                                    VerticalAlignment="Stretch"
+                                    HorizontalContentAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"
+                                    VerticalContentAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource TemplatedParent}}"
+                                    AcceptsReturn="{Binding AcceptsReturn, RelativeSource={RelativeSource TemplatedParent}}"
+                                    Background="Transparent"
+                                    CaretBrush="{TemplateBinding Foreground}"
+                                    FontSize="{TemplateBinding FontSize}"
+                                    Foreground="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}}"
+                                    SelectionBrush="{DynamicResource Brush.Border}"
+                                    Text="{Binding Text, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
+                                    TextWrapping="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}"
+                                    ToolTip="{Binding Text, RelativeSource={RelativeSource TemplatedParent}}">
+                                <FrameworkElement.Style>
+                                    <Style TargetType="{x:Type TextBox}">
+                                        <Setter Property="BorderThickness" Value="0" />
+                                        <Setter Property="TextBoxBase.CaretBrush" Value="{DynamicResource Brush.Text}" />
+                                        <Setter Property="Padding" Value="4,0,0,0" />
+                                        <Setter Property="ToolTipService.ShowOnDisabled" Value="True" />
+                                        <Setter Property="VerticalAlignment" Value="Center" />
+                                        <Style.Triggers>
+                                            <DataTrigger Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}" Value="Wrap">
+                                                <Setter Property="TextBoxBase.AcceptsReturn" Value="True" />
+                                            </DataTrigger>
+                                            <DataTrigger Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}" Value="WrapWithOverflow">
+                                                <Setter Property="TextBoxBase.AcceptsReturn" Value="True" />
+                                            </DataTrigger>
+                                            <DataTrigger Binding="{Binding TextWrapping, RelativeSource={RelativeSource TemplatedParent}}" Value="NoWrap">
+                                                <Setter Property="TextBoxBase.AcceptsReturn" Value="False" />
+                                            </DataTrigger>
+                                            <!--<DataTrigger Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}" Value="{x:Null}">
+                                                    <Setter Property="Padding" Value="5,0" />
+                                                </DataTrigger>
+                                                <DataTrigger Value="" Binding="{Binding Unit, RelativeSource={RelativeSource TemplatedParent}}">
+                                                    <Setter Property="Padding" Value="5,0" />
+                                                </DataTrigger>-->
+                                        </Style.Triggers>
+                                    </Style>
+                                </FrameworkElement.Style>
+                            </TextBox>
+                        </Border>
+                        <ControlTemplate.Triggers>
+                            <Trigger Property="Validation.HasError" Value="True">
+                                <Setter TargetName="boder" Property="BorderBrush" Value="{StaticResource Brush.Error}" />
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style.Setters>
+    </Style>
 </ResourceDictionary>

+ 2 - 2
SKMC.UI/Themes/Light.xaml

@@ -5,8 +5,8 @@
     <Color x:Key="Color.MachineControls">#DCDCDC</Color>
     <Color x:Key="Color.Overlay">#FCF3EC</Color>
     <Color x:Key="Color.DarkOverlay">#FFFFFF</Color>
-    <Color x:Key="Color.HeaderAlternative">#FCE4D2</Color>
-    <Color x:Key="Color.BodyAlternative">#FFFBF0</Color>
+    <Color x:Key="Color.HeaderAlternative">#DCEAF7</Color>
+    <Color x:Key="Color.BodyAlternative">#F5F9FD</Color>
     <Color x:Key="Color.Button">#333333</Color>
     <Color x:Key="Color.Text">#1A1A1A</Color>
     <Color x:Key="Color.TextContrast">#F5F5F5</Color>