diff --git a/.gitignore b/.gitignore index ad4d0fec..d51beecc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,5 @@ -DockBoxResearch/bin -DockBoxResearch/obj -src/.vs -src/Core_30/HandyControl_Core_30/bin -src/Core_30/HandyControl_Core_30/obj -src/Core_30/HandyControlDemo_Core_30/bin -src/Core_30/HandyControlDemo_Core_30/obj -src/Net_35/HandyControl_Net_35/bin -src/Net_35/HandyControl_Net_35/obj -src/Net_35/HandyControlDemo_Net_35/bin -src/Net_35/HandyControlDemo_Net_35/obj -src/Net_40/HandyControl_Net_40/bin -src/Net_40/HandyControl_Net_40/obj -src/Net_40/HandyControlDemo_Net_40/bin -src/Net_40/HandyControlDemo_Net_40/obj -src/Net_GE45/HandyControl_Net_GE45/bin -src/Net_GE45/HandyControl_Net_GE45/obj -src/Net_GE45/HandyControlDemo_Net_GE45/bin -src/Net_GE45/HandyControlDemo_Net_GE45/obj -*.user \ No newline at end of file +.vs +*.user +*.xml +[Bb]in/ +[Oo]bj/ \ No newline at end of file diff --git a/Installers/VS2019/HandyControl_VS2019.sln b/Installers/VS2019/HandyControl_VS2019.sln new file mode 100644 index 00000000..6e2908e9 --- /dev/null +++ b/Installers/VS2019/HandyControl_VS2019.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.352 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandyControl_VS2019", "HandyControl_VS2019\HandyControl_VS2019.csproj", "{3F0F7B9E-C150-4FAA-9274-4F6F0A96B8CA}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {3F0F7B9E-C150-4FAA-9274-4F6F0A96B8CA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3F0F7B9E-C150-4FAA-9274-4F6F0A96B8CA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3F0F7B9E-C150-4FAA-9274-4F6F0A96B8CA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3F0F7B9E-C150-4FAA-9274-4F6F0A96B8CA}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {A7F567D2-5FA3-4E17-A8A8-CDAFC217BFF5} + EndGlobalSection +EndGlobal diff --git a/Installers/VS2019/HandyControl_VS2019/HandyControl_VS2019.csproj b/Installers/VS2019/HandyControl_VS2019/HandyControl_VS2019.csproj new file mode 100644 index 00000000..a652ad34 --- /dev/null +++ b/Installers/VS2019/HandyControl_VS2019/HandyControl_VS2019.csproj @@ -0,0 +1,99 @@ + + + + 16.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + Debug + AnyCPU + 2.0 + {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + {3F0F7B9E-C150-4FAA-9274-4F6F0A96B8CA} + Library + Properties + HandyControl_VS2019 + HandyControl_VS2019 + v4.7.2 + true + true + true + false + false + true + true + Program + $(DevEnvDir)devenv.exe + /rootsuffix Exp + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + Always + true + + + Always + true + + + Always + true + + + Designer + + + + + + + + + + + + true + Always + + + true + Always + + + true + Always + + + + + + + \ No newline at end of file diff --git a/Installers/VS2019/HandyControl_VS2019/HandyControl_VS2019Package.cs b/Installers/VS2019/HandyControl_VS2019/HandyControl_VS2019Package.cs new file mode 100644 index 00000000..10e0ebb6 --- /dev/null +++ b/Installers/VS2019/HandyControl_VS2019/HandyControl_VS2019Package.cs @@ -0,0 +1,53 @@ +using System; +using System.Runtime.InteropServices; +using System.Threading; +using Microsoft.VisualStudio.Shell; +using Task = System.Threading.Tasks.Task; + +namespace HandyControl_VS2019 +{ + /// + /// This is the class that implements the package exposed by this assembly. + /// + /// + /// + /// The minimum requirement for a class to be considered a valid package for Visual Studio + /// is to implement the IVsPackage interface and register itself with the shell. + /// This package uses the helper classes defined inside the Managed Package Framework (MPF) + /// to do it: it derives from the Package class that provides the implementation of the + /// IVsPackage interface and uses the registration attributes defined in the framework to + /// register itself and its components with the shell. These attributes tell the pkgdef creation + /// utility what data to put into .pkgdef file. + /// + /// + /// To get loaded into VS, the package must be referred by <Asset Type="Microsoft.VisualStudio.VsPackage" ...> in .vsixmanifest file. + /// + /// + [PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)] + [Guid(PackageGuidString)] + public sealed class HandyControl_VS2019Package : AsyncPackage + { + /// + /// HandyControl_VS2019Package GUID string. + /// + public const string PackageGuidString = "157ef242-83b5-47d0-8f2f-e21dc8308151"; + + #region Package Members + + /// + /// Initialization of the package; this method is called right after the package is sited, so this is the place + /// where you can put all the initialization code that rely on services provided by VisualStudio. + /// + /// A cancellation token to monitor for initialization cancellation, which can occur when VS is shutting down. + /// A provider for progress updates. + /// A task representing the async work of package initialization, or an already completed task if there is none. Do not return null from this method. + protected override async Task InitializeAsync(CancellationToken cancellationToken, IProgress progress) + { + // When initialized asynchronously, the current thread may be a background thread at this point. + // Do any initialization that requires the UI thread after switching to the UI thread. + await this.JoinableTaskFactory.SwitchToMainThreadAsync(cancellationToken); + } + + #endregion + } +} diff --git a/Installers/VS2019/HandyControl_VS2019/License.txt b/Installers/VS2019/HandyControl_VS2019/License.txt new file mode 100644 index 00000000..cfef606b --- /dev/null +++ b/Installers/VS2019/HandyControl_VS2019/License.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2018-2019 HandyOrg + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/Installers/VS2019/HandyControl_VS2019/Packages/handycontrol.2.0.0.nupkg b/Installers/VS2019/HandyControl_VS2019/Packages/handycontrol.2.0.0.nupkg new file mode 100644 index 00000000..b442d002 Binary files /dev/null and b/Installers/VS2019/HandyControl_VS2019/Packages/handycontrol.2.0.0.nupkg differ diff --git a/Installers/VS2019/HandyControl_VS2019/ProjectTemplates/WpfApp.zip b/Installers/VS2019/HandyControl_VS2019/ProjectTemplates/WpfApp.zip new file mode 100644 index 00000000..4d7cadf9 Binary files /dev/null and b/Installers/VS2019/HandyControl_VS2019/ProjectTemplates/WpfApp.zip differ diff --git a/Installers/VS2019/HandyControl_VS2019/ProjectTemplates/WpfCoreApp.zip b/Installers/VS2019/HandyControl_VS2019/ProjectTemplates/WpfCoreApp.zip new file mode 100644 index 00000000..073b19ef Binary files /dev/null and b/Installers/VS2019/HandyControl_VS2019/ProjectTemplates/WpfCoreApp.zip differ diff --git a/Installers/VS2019/HandyControl_VS2019/Properties/AssemblyInfo.cs b/Installers/VS2019/HandyControl_VS2019/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..5ecbbb92 --- /dev/null +++ b/Installers/VS2019/HandyControl_VS2019/Properties/AssemblyInfo.cs @@ -0,0 +1,14 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +[assembly: AssemblyTitle("HandyControl_VS2019")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("HandyControl_VS2019")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] +[assembly: ComVisible(false)] +[assembly: AssemblyVersion("2.0.0")] +[assembly: AssemblyFileVersion("2.0.0")] \ No newline at end of file diff --git a/Installers/VS2019/HandyControl_VS2019/icon_100_100.png b/Installers/VS2019/HandyControl_VS2019/icon_100_100.png new file mode 100644 index 00000000..df0bb782 Binary files /dev/null and b/Installers/VS2019/HandyControl_VS2019/icon_100_100.png differ diff --git a/Installers/VS2019/HandyControl_VS2019/icon_300_300.png b/Installers/VS2019/HandyControl_VS2019/icon_300_300.png new file mode 100644 index 00000000..cb318d98 Binary files /dev/null and b/Installers/VS2019/HandyControl_VS2019/icon_300_300.png differ diff --git a/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest b/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest new file mode 100644 index 00000000..4f081ca5 --- /dev/null +++ b/Installers/VS2019/HandyControl_VS2019/source.extension.vsixmanifest @@ -0,0 +1,31 @@ + + + + + HandyControl for VS2019 + This VSIX Project will help people initialize a HandyControl project. + https://handyorg.github.io/handycontrol + License.txt + https://handyorg.github.io/handycontrol/quick_start + https://github.com/HandyOrg/HandyControl/releases + icon_100_100.png + icon_300_300.png + WPF C# Control + + + + + + + + + + + + + + + + + + diff --git a/LICENSE b/LICENSE index 1ba53fed..f9f0dead 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 HandyOrg +Copyright (c) 2018-2019 HandyOrg Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 18acdfdb..cdd97043 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ![logo](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/icon.png) -![dotnet-version](https://img.shields.io/badge/.net-%3E%3D4.0-blue.svg) ![csharp-version](https://img.shields.io/badge/C%23-7.0-blue.svg) ![IDE-version](https://img.shields.io/badge/IDE-vs2017-blue.svg) [![nuget-version](https://img.shields.io/nuget/v/HandyControl.svg)](https://www.nuget.org/packages/HandyControl) [![build-status](https://ci.appveyor.com/api/projects/status/github/handyorg/handycontrol?svg=true)](https://ci.appveyor.com/project/handyorg/handycontrol) [![Join the chat at https://gitter.im/HandyControl/Lobby](https://badges.gitter.im/HandyControl/Lobby.svg)](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![qq-group](https://img.shields.io/badge/qq-714704041-red.svg)](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) +![dotnet-version](https://img.shields.io/badge/.net-%3E%3D4.0-blue.svg) ![csharp-version](https://img.shields.io/badge/C%23-7.3-blue.svg) ![IDE-version](https://img.shields.io/badge/IDE-vs2019-blue.svg) [![nuget-version](https://img.shields.io/nuget/v/HandyControl.svg)](https://www.nuget.org/packages/HandyControl) [![build-status](https://ci.appveyor.com/api/projects/status/github/handyorg/handycontrol?svg=true)](https://ci.appveyor.com/project/handyorg/handycontrol) [![Join the chat at https://gitter.im/HandyControl/Lobby](https://badges.gitter.im/HandyControl/Lobby.svg)](https://gitter.im/HandyControl/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![qq-group](https://img.shields.io/badge/qq-714704041-red.svg)](//shang.qq.com/wpa/qunwpa?idkey=a571e5553c9d41e49c4f22f3a8b2865451497a795ff281fedf3285def247efc1) [![wiki](https://img.shields.io/badge/wiki-Complete-brightgreen.svg)](https://github.com/ghost1372/HandyControl/wiki) # Welcome to HandyControl @@ -44,7 +44,16 @@ Step 2:Add code in App.xaml as follows: ``` -Step 3:enjoy coding + +Step 3: Add NameSpace: +`xmlns:hc="https://handyorg.github.io/handycontrol"` + +Step 4:enjoy coding + +## VSIX packages for Visual Studio + +| [VS2019](https://marketplace.visualstudio.com/items?itemName=HandyOrg.handycontrolforvs2019) | +| ------------- | ## Overview diff --git a/doc/.gitignore b/doc/.gitignore index 063b0e4c..7cb111d8 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -4,4 +4,5 @@ db.json *.log node_modules/ public/ -.deploy*/ \ No newline at end of file +.deploy*/ +.vs \ No newline at end of file diff --git a/doc/source/handycontrol/attach/backgroundSwitchElement/index.md b/doc/source/handycontrol/attach/backgroundSwitchElement/index.md index ca12ad62..2fa310da 100644 --- a/doc/source/handycontrol/attach/backgroundSwitchElement/index.md +++ b/doc/source/handycontrol/attach/backgroundSwitchElement/index.md @@ -1,5 +1,42 @@ --- -title: 建设中 +title: BackgroundSwitchElement 可切换背景的元素 --- -建设中 \ No newline at end of file +# 准备工作 +添加`HandyControl`命名空间 +{% code %} +xmlns:hc="https://handyorg.github.io/handycontrol" +{% endcode %} + +## MouseHoverBackground `鼠标悬浮背景色` + +该附加属性常用于设置控件在鼠标悬浮时的背景色,在控件的样式或者模板中我们添加如下的触发器代码: + +{% code %} + + + +{% endcode %} + +随后我们就可以使用该属性了: + +{% code %} +<目标控件 controls:BackgroundSwitchElement.MouseHoverBackground ="Blue"/> +{% endcode %} + +## MouseDownBackground `鼠标按下背景色` + +该附加属性常用于设置控件在鼠标按下时的背景色,在控件的样式或者模板中我们添加如下的触发器代码: + +{% code %} + + + +{% endcode %} + +随后我们就可以使用该属性了: + +{% code %} +<目标控件 controls:BackgroundSwitchElement.MouseDownBackground ="Yellow"/> +{% endcode %} \ No newline at end of file diff --git a/doc/source/handycontrol/attach/images/Attach.png b/doc/source/handycontrol/attach/images/Attach.png new file mode 100644 index 00000000..efda668e Binary files /dev/null and b/doc/source/handycontrol/attach/images/Attach.png differ diff --git a/doc/source/handycontrol/attach/index.md b/doc/source/handycontrol/attach/index.md index ca12ad62..c8aa438a 100644 --- a/doc/source/handycontrol/attach/index.md +++ b/doc/source/handycontrol/attach/index.md @@ -1,5 +1,9 @@ --- -title: 建设中 +title: 附加属性 --- -建设中 \ No newline at end of file +附加属性源码在Controls / Attach文件夹中: + +![Attach](images/Attach.png) + +以`Element`结尾的类,可以为所有的控件设置一些共有的属性,以`Attach`结尾的类,只能为一种控件设置相关的属性。 \ No newline at end of file diff --git a/doc/source/handycontrol/attach/linkElement/index.md b/doc/source/handycontrol/attach/passwordBoxAttach/index.md similarity index 100% rename from doc/source/handycontrol/attach/linkElement/index.md rename to doc/source/handycontrol/attach/passwordBoxAttach/index.md diff --git a/doc/source/handycontrol/attach/passwordBoxMonitor/index.md b/doc/source/handycontrol/attach/passwordBoxMonitor/index.md deleted file mode 100644 index ca12ad62..00000000 --- a/doc/source/handycontrol/attach/passwordBoxMonitor/index.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 建设中 ---- - -建设中 \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/behaviors/index.md b/doc/source/handycontrol/basic_xaml/behaviors/index.md index d994b47f..8975830f 100644 --- a/doc/source/handycontrol/basic_xaml/behaviors/index.md +++ b/doc/source/handycontrol/basic_xaml/behaviors/index.md @@ -14,5 +14,5 @@ title: 行为 | BehaviorY400 | 流体移动行为,y轴运动,400毫秒结束动画 | {% note info no-icon %} -用例:`controls:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"` +用例:`hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"` {% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/converters/index.md b/doc/source/handycontrol/basic_xaml/converters/index.md index 3af87443..8b936e70 100644 --- a/doc/source/handycontrol/basic_xaml/converters/index.md +++ b/doc/source/handycontrol/basic_xaml/converters/index.md @@ -50,6 +50,10 @@ title: 转换器 如果该转换器获取到的值为`null`则返回`false`,否则返回`true`。 +# Object2VisibilityConverter + +如果该转换器获取到的值为`null`则返回`Collapsed`,否则返回`Visible`。 + # String2VisibilityConverter 该转换器接受一个字符串,如果该字符串为空或者为null,则返回`Collapse`,否则返回`Visible`。 diff --git a/doc/source/handycontrol/images/Build_Config.png b/doc/source/handycontrol/images/Build_Config.png index 1c030a11..8568462f 100644 Binary files a/doc/source/handycontrol/images/Build_Config.png and b/doc/source/handycontrol/images/Build_Config.png differ diff --git a/doc/source/handycontrol/images/Project_Structure.png b/doc/source/handycontrol/images/Project_Structure.png index 79dc7658..e7a9f4ed 100644 Binary files a/doc/source/handycontrol/images/Project_Structure.png and b/doc/source/handycontrol/images/Project_Structure.png differ diff --git a/doc/source/handycontrol/index.md b/doc/source/handycontrol/index.md index 1be36394..407206a8 100644 --- a/doc/source/handycontrol/index.md +++ b/doc/source/handycontrol/index.md @@ -4,12 +4,15 @@ title: 欢迎使用HandyControl HandyControl是一套WPF控件库,它几乎重写了所有原生样式,同时包含50多款额外的控件(正逐步增加)。 -# 使用要求 +# 要求 - - .Net >= 4.0 - - OS >= win7 - - IDE >= vs2017 - - C# >= 7.0 +- 使用要求 +.Net >= 4.0 +OS >= win7 + +- 编译要求 +IDE >= vs2019 +C# >= 7.3 # 下载 @@ -28,7 +31,7 @@ Github上一般每天都有更新,相对而言不适合用于生产。 {% endnote %} {% note warning %} -文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以本文档为准,因为文档是相对稳定的。 +文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以Github上Demo示例为准。 {% endnote %} # 项目结构介绍 @@ -38,7 +41,7 @@ Github上一般每天都有更新,相对而言不适合用于生产。 从Github上克隆好源码后,进入src文件夹,该文件夹结构如下: ![Project_Structure](images/Project_Structure.png) -这里一共有三个解决方案sln文件,需要注意的是HandyControl_Core30.sln需要用VS2019打开,其它两个用VS2017即可。 +这里一共有4个解决方案sln文件。 `Net_GE45`的意思是.Net版本大于等于4.5 @@ -83,6 +86,6 @@ Controls中的每个控件一般都能在Themes中找到对应的xaml定义。 {% endnote %} {% note info %} -HandyControl_Net_GE45.sln解决方案中包含了3个项目类型,分别是.Net 4.5、.Net 4.6.2和.Net 4.7,请在解决方案配置下拉框中进行选择: +打开HandyControl.sln,在解决方案配置下拉框中选择指定的环境进行编译: ![Build_Config](images/Build_Config.png) {% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/langs/images/Langs.png b/doc/source/handycontrol/langs/images/Langs.png new file mode 100644 index 00000000..cfec814b Binary files /dev/null and b/doc/source/handycontrol/langs/images/Langs.png differ diff --git a/doc/source/handycontrol/langs/index.md b/doc/source/handycontrol/langs/index.md index ca12ad62..567e3917 100644 --- a/doc/source/handycontrol/langs/index.md +++ b/doc/source/handycontrol/langs/index.md @@ -1,5 +1,30 @@ --- -title: 建设中 +title: 国际化 --- -建设中 \ No newline at end of file +# 使用方式 + +可通过`ConfigHelper.Instance.SetLang(string lang)`指定需要使用的语言包,默认使用zh-cn。 + +控件库自带的语言包一般为控件库内部使用,但用户也可以通过以下两种方式使用: + +- xaml +第一步,引入命名空间:`xmlns:hc="https://handyorg.github.io/handycontrol"` +第二步,使用语言包:`` + +- C# +`HandyControl.Properties.Langs.Lang.Cancel` + +{% note warning %} +控件库不支持动态语言包切换,未来也不会有支持。 +{% endnote %} + +# 扩展 + +控件库自带zh-cn和en两份语言包,默认为zh-cn: + +![Langs](images/Langs.png) + +如果需要可自行扩展,这里推荐使用开源插件:[ResXManager](https://marketplace.visualstudio.com/items?itemName=TomEnglert.ResXManager),来维护所有的语言包。 + +引用控件库后,会在运行目录生成语言包文件夹,其命名方式形如zh-cn、en等。 \ No newline at end of file diff --git a/doc/source/handycontrol/native_controls/comboBox/index.md b/doc/source/handycontrol/native_controls/comboBox/index.md index 6c05f375..588fe39d 100644 --- a/doc/source/handycontrol/native_controls/comboBox/index.md +++ b/doc/source/handycontrol/native_controls/comboBox/index.md @@ -4,16 +4,40 @@ title: ComboBox 组合框 # ComboBoxBaseStyle -原生组合框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。 +原生组合框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。原生组合框如果未设置任何样式,则默认使用该样式: + +- 默认样式 +`` +![ComboBoxBaseStyle](../images/ComboBoxBaseStyle.png) # ComboBoxExtendBaseStyle : ComboBoxBaseStyle 原生组合框扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。 -# ComboBoxPlusBaseStyle : ComboBoxExtendBaseStyle - -扩展组合框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。 - # ComboBoxExtend : ComboBoxExtendBaseStyle -相对于原生组合框默认样式,它借助于附加属性可以实现标题、水印的功能。 \ No newline at end of file +相对于原生组合框默认样式,它借助于附加属性可以实现标题、水印的功能。 + +- 标题在上 +`` +![ComboBoxExtend_1](../images/ComboBoxExtend_1.png) + +- 标题在左 +`` +![ComboBoxExtend_2](../images/ComboBoxExtend_2.png) + +{% note warning %} +标题在左时,为了多个输入框左侧对齐,需要设置标题宽度,标题宽度无需逐个设置,可在外部容器上统一设置。 +{% endnote %} + +- 标题在上,带有水印 +`` +![ComboBoxExtend_3](../images/ComboBoxExtend_3.png) + +- 标题在上,带有水印,且为必填 +`` +![ComboBoxExtend_4](../images/ComboBoxExtend_4.png) + +- 标题在上,带有水印,且为必填,同时自定义必填提示符 +`` +![ComboBoxExtend_5](../images/ComboBoxExtend_5.png) \ No newline at end of file diff --git a/doc/source/handycontrol/native_controls/contentControl/index.md b/doc/source/handycontrol/native_controls/contentControl/index.md index ca12ad62..22b4365c 100644 --- a/doc/source/handycontrol/native_controls/contentControl/index.md +++ b/doc/source/handycontrol/native_controls/contentControl/index.md @@ -1,5 +1,5 @@ --- -title: 建设中 +title: ContentControl 内容控件 --- -建设中 \ No newline at end of file +所有的`ContentControl`默认无法获得焦点 \ No newline at end of file diff --git a/doc/source/handycontrol/native_controls/contextMenu/index.md b/doc/source/handycontrol/native_controls/contextMenu/index.md index ca12ad62..fdcf837e 100644 --- a/doc/source/handycontrol/native_controls/contextMenu/index.md +++ b/doc/source/handycontrol/native_controls/contextMenu/index.md @@ -1,5 +1,22 @@ --- -title: 建设中 +title: ContextMenu 上下文菜单 --- -建设中 \ No newline at end of file +# ContextMenuBaseStyle + +上下文菜单默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。 + +{% note info no-icon %} +用例: + +{% code %} + + + + + + + +{% endcode %} +![ContextMenu](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/ContextMenu.png) +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/native_controls/dataGrid/index.md b/doc/source/handycontrol/native_controls/dataGrid/index.md index ca12ad62..7ea36f18 100644 --- a/doc/source/handycontrol/native_controls/dataGrid/index.md +++ b/doc/source/handycontrol/native_controls/dataGrid/index.md @@ -1,5 +1,32 @@ --- -title: 建设中 +title: DataGrid 数据表格 --- -建设中 \ No newline at end of file +{% note info no-icon %} +用例: + +{% code %} + + + + + + + + + + + + + + + + + + + + + +{% endcode %} +![ContextMenu](https://raw.githubusercontent.com/NaBian/HandyControl/master/Resources/DataGrid.png) +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/native_controls/datePicker/index.md b/doc/source/handycontrol/native_controls/datePicker/index.md index ca12ad62..d4f5933e 100644 --- a/doc/source/handycontrol/native_controls/datePicker/index.md +++ b/doc/source/handycontrol/native_controls/datePicker/index.md @@ -1,5 +1,38 @@ --- -title: 建设中 +title: DatePicker 日期选择器 --- -建设中 \ No newline at end of file +# DatePickerBaseStyle + +原生日期选择器默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。原生日期选择器如果未设置任何样式,则默认使用该样式: + +- 默认样式 +`` +![ComboBoxBaseStyle](../images/DatePickerBaseStyle.png) + +# DatePickerExtendBaseStyle : DatePickerBaseStyle + +原生日期选择器扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。 + +# DatePickerExtend : DatePickerExtendBaseStyle + +- 标题在上 +`` +![DatePickerExtend_1](../images/DatePickerExtend_1.png) + +- 标题在左 +`` +![DatePickerExtend_2](../images/DatePickerExtend_2.png) + +{% note warning %} +标题在左时,为了多个输入框左侧对齐,需要设置标题宽度,标题宽度无需逐个设置,可在外部容器上统一设置。 +{% endnote %} + +- 标题在上,带有水印 +[参见Combobox](../combobox) + +- 标题在上,带有水印,且为必填 +[参见Combobox](../combobox) + +- 标题在上,带有水印,且为必填,同时自定义必填提示符 +[参见Combobox](../combobox) \ No newline at end of file diff --git a/doc/source/handycontrol/native_controls/images/ComboBoxBaseStyle.png b/doc/source/handycontrol/native_controls/images/ComboBoxBaseStyle.png new file mode 100644 index 00000000..84e4da34 Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/ComboBoxBaseStyle.png differ diff --git a/doc/source/handycontrol/native_controls/images/ComboBoxExtend_1.png b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_1.png new file mode 100644 index 00000000..31195a92 Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_1.png differ diff --git a/doc/source/handycontrol/native_controls/images/ComboBoxExtend_2.png b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_2.png new file mode 100644 index 00000000..a2b8060c Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_2.png differ diff --git a/doc/source/handycontrol/native_controls/images/ComboBoxExtend_3.png b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_3.png new file mode 100644 index 00000000..56a4ef35 Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_3.png differ diff --git a/doc/source/handycontrol/native_controls/images/ComboBoxExtend_4.png b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_4.png new file mode 100644 index 00000000..9287b33d Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_4.png differ diff --git a/doc/source/handycontrol/native_controls/images/ComboBoxExtend_5.png b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_5.png new file mode 100644 index 00000000..761325f3 Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/ComboBoxExtend_5.png differ diff --git a/doc/source/handycontrol/native_controls/images/DatePickerBaseStyle.png b/doc/source/handycontrol/native_controls/images/DatePickerBaseStyle.png new file mode 100644 index 00000000..ddc505b1 Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/DatePickerBaseStyle.png differ diff --git a/doc/source/handycontrol/native_controls/images/DatePickerExtend_1.png b/doc/source/handycontrol/native_controls/images/DatePickerExtend_1.png new file mode 100644 index 00000000..489f613f Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/DatePickerExtend_1.png differ diff --git a/doc/source/handycontrol/native_controls/images/DatePickerExtend_2.png b/doc/source/handycontrol/native_controls/images/DatePickerExtend_2.png new file mode 100644 index 00000000..2f350a68 Binary files /dev/null and b/doc/source/handycontrol/native_controls/images/DatePickerExtend_2.png differ diff --git a/doc/source/handycontrol/quick_start/index.md b/doc/source/handycontrol/quick_start/index.md new file mode 100644 index 00000000..9ec44b4c --- /dev/null +++ b/doc/source/handycontrol/quick_start/index.md @@ -0,0 +1,25 @@ +--- +title: 快速开始 +--- + +# 第一步 +下载源码或者以Nuget的方式引用控件库。 +源码链接:[HandyControl-Github](https://github.com/HandyOrg/HandyControl) +Nuget链接:[HandyControl-Nuget](https://www.nuget.org/packages/HandyControl/) + +# 第二步 +在App.xaml中添加以下代码: + +``` xml + + + + + + + + +``` + +# 第三步 +添加命名空间:`xmlns:hc="https://handyorg.github.io/handycontrol"` \ No newline at end of file diff --git a/doc/source/handycontrol/tnx/index.md b/doc/source/handycontrol/tnx/index.md index 4a7f298c..129c2af4 100644 --- a/doc/source/handycontrol/tnx/index.md +++ b/doc/source/handycontrol/tnx/index.md @@ -4,7 +4,7 @@ title: 鸣谢 # 感谢以下Coder提供代码贡献 -

ghost1372Dingping ZhangM0n7y5guanguanchuangyu

+

ghost1372Dingping ZhangM0n7y5guanguanchuangyuyanchao891012noctwolf

# 感谢以下User提供使用建议 @@ -16,4 +16,4 @@ title: 鸣谢 # 感谢以下捐赠者 -

bigorange1900

\ No newline at end of file +

bigorange1900bigorange1900bigorange1900bigorange1900

\ No newline at end of file diff --git a/doc/themes/next/_config.yml b/doc/themes/next/_config.yml index 49b310a1..92a82f52 100644 --- a/doc/themes/next/_config.yml +++ b/doc/themes/next/_config.yml @@ -161,8 +161,9 @@ menu: HandyControl: default: /handycontrol/ || 鸣谢: /tnx/ || - 总览: /overview/ || - 规范: /specifications/ || + 快速开始: /quick_start/ || + # 总览: /overview/ || + # 规范: /specifications/ || 基础xaml定义: default: /basic_xaml/ || 行为: /behaviors/ || @@ -176,21 +177,20 @@ menu: 尺寸: /sizes/ || 附加属性: default: /attach/ || - BackgroundSwitchElement: /backgroundSwitchElement/ || - BorderElement: /borderElement/ || - DataGridAttach: /dataGridAttach/ || + BackgroundSwitchElement 可切换背景的元素: /backgroundSwitchElement/ || + BorderElement 具有边框的元素: /borderElement/ || + DataGridAttach DataGrid专用: /dataGridAttach/ || EdgeElement: /edgeElement/ || - IconElement: /iconElement/ || - IconSwitchElement: /iconSwitchElement/ || - InfoElement: /infoElement/ || - LinkElement: /linkElement/ || - PanelElement: /panelElement/ || - PasswordBoxMonitor: /passwordBoxMonitor/ || - StatusSwitchElement: /statusSwitchElement/ || - TipElement: /tipElement/ || - TitleElement: /titleElement/ || - VisualElement: /visualElement/ || - WindowAttach: /windowAttach/ || + IconElement 具有图标的元素: /iconElement/ || + IconSwitchElement 可切换图标的元素: /iconSwitchElement/ || + InfoElement 信息元素: /infoElement/ || + PanelElement 面板元素: /panelElement/ || + PasswordBoxAttach 密码框专用: /passwordBoxAttach/ || + StatusSwitchElement 可切换状态的元素: /statusSwitchElement/ || + TipElement 提示元素: /tipElement/ || + TitleElement 标题元素: /titleElement/ || + VisualElement 可视化元素: /visualElement/ || + WindowAttach 窗体专用: /windowAttach/ || 原生控件: default: /native_controls/ || Border 边框: /border/ || diff --git a/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj b/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj index f4e0039c..3a6182e6 100644 --- a/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj +++ b/src/Core_30/HandyControlDemo_Core_30/HandyControlDemo_Core30.csproj @@ -5,8 +5,12 @@ true HandyControlDemo HandyControlDemo - 1.5.5 + 2.0.0 ..\..\Shared\HandyControlDemo_Shared\Resources\Img\icon.ico + Debug;Release + Copyright © HandyOrg 2018-2019 + 2.0.0.0 + 2.0.0.0 TRACE;Core @@ -315,7 +319,7 @@ Resources\Img\LeftMainContent\WindowsForm_16x.png - + Resources\Img\LeftMainContent\GridPane_16x.png @@ -345,8 +349,8 @@ Resources\fabric-icons.ttf - - Resources\Img\LeftMainContent\MainMenuControl_16x.png + + Resources\Img\LeftMainContent\brackets_Square_16xLG.png diff --git a/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj b/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj index 0afdeaa1..f5711c96 100644 --- a/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj +++ b/src/Core_30/HandyControl_Core_30/HandyControl_Core_30.csproj @@ -4,12 +4,13 @@ true HandyControl HandyControl - 1.5.5 - 1.5.5.0 + 2.0.0 + 2.0.0.0 false false Copyright © HandyOrg 2018-2019 Contains some commonly used simple WPF controls + Debug;Release TRACE;Core diff --git a/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml b/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml index 8984ae6f..56fe5a0e 100644 --- a/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml +++ b/src/Core_30/HandyControl_Core_30/Themes/Styles/Base/TreeViewBaseStyle.xaml @@ -37,12 +37,11 @@ - + + @@ -211,7 +223,7 @@ - + diff --git a/src/Core_30/HandyControl_Core_30/Themes/Styles/Growl.xaml b/src/Core_30/HandyControl_Core_30/Themes/Styles/Growl.xaml index 88da46d1..d28b4fa2 100644 --- a/src/Core_30/HandyControl_Core_30/Themes/Styles/Growl.xaml +++ b/src/Core_30/HandyControl_Core_30/Themes/Styles/Growl.xaml @@ -11,6 +11,7 @@ - + + @@ -212,7 +224,7 @@ - + diff --git a/src/Net_40/HandyControl_Net_40/Themes/Styles/Growl.xaml b/src/Net_40/HandyControl_Net_40/Themes/Styles/Growl.xaml index 88da46d1..d28b4fa2 100644 --- a/src/Net_40/HandyControl_Net_40/Themes/Styles/Growl.xaml +++ b/src/Net_40/HandyControl_Net_40/Themes/Styles/Growl.xaml @@ -11,6 +11,7 @@ - + + @@ -211,7 +223,7 @@ - + diff --git a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Growl.xaml b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Growl.xaml index 88da46d1..d28b4fa2 100644 --- a/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Growl.xaml +++ b/src/Net_GE45/HandyControl_Net_GE45/Themes/Styles/Growl.xaml @@ -11,6 +11,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CoverFlowBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CoverFlowBaseStyle.xaml index db718fdb..d2bec2dc 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/CoverFlowBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/CoverFlowBaseStyle.xaml @@ -3,6 +3,7 @@ xmlns:controls="clr-namespace:HandyControl.Controls"> + + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/GravatarBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/GravatarBaseStyle.xaml index 861062d2..a32f2f07 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/GravatarBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/GravatarBaseStyle.xaml @@ -3,6 +3,7 @@ xmlns:controls="clr-namespace:HandyControl.Controls"> diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/PasswordBoxBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/PasswordBoxBaseStyle.xaml index f9073bbc..d79a4f45 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/PasswordBoxBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/PasswordBoxBaseStyle.xaml @@ -65,7 +65,7 @@ - + @@ -97,7 +97,7 @@ - + @@ -119,7 +119,7 @@ - + @@ -146,7 +146,7 @@ - + @@ -296,7 +296,7 @@ - + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml index a956a666..39ffaf97 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/RadioButtonBaseStyle.xaml @@ -127,7 +127,7 @@ - + @@ -174,7 +174,7 @@ - + diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/RateBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/RateBaseStyle.xaml index 2d2c7854..433af7ef 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/RateBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/RateBaseStyle.xaml @@ -5,9 +5,11 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Styles/Base/StepBarBaseStyle.xaml b/src/Shared/HandyControl_Shared/Themes/Styles/Base/StepBarBaseStyle.xaml index b1469330..7a07e6e3 100644 --- a/src/Shared/HandyControl_Shared/Themes/Styles/Base/StepBarBaseStyle.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Styles/Base/StepBarBaseStyle.xaml @@ -8,6 +8,7 @@ + + @@ -30,7 +42,7 @@ -