From a2684e679e4c5d5baffcdb2c3ff7cef188fc9953 Mon Sep 17 00:00:00 2001 From: guanguanchuangyu <3246907890@qq.com> Date: Mon, 18 Nov 2019 21:31:00 +0800 Subject: [PATCH 1/2] add doc of visualelement and windowattach --- .../attach/visualElement/index.md | 78 ++++++++++++++++++- .../handycontrol/attach/windowAttach/index.md | 55 ++++++++++++- 2 files changed, 129 insertions(+), 4 deletions(-) diff --git a/doc/source/handycontrol/attach/visualElement/index.md b/doc/source/handycontrol/attach/visualElement/index.md index ca12ad62..b7572a01 100644 --- a/doc/source/handycontrol/attach/visualElement/index.md +++ b/doc/source/handycontrol/attach/visualElement/index.md @@ -1,5 +1,79 @@ --- -title: 建设中 +title: VisualElement 可视化元素 --- -建设中 \ No newline at end of file +# 属性 + +| 名称 | 用途 | +| -------------- | ---------------- | +| HighlightBrush | 设置控件高亮颜色 | +| Text | 设置文本内容 | + +# 使用案例 + +对应`xaml`中添加`HandyControl`对应的命名空`xmlns:hc="https://handyorg.github.io/handycontrol"` + +## HighlightBrush 设置控件高亮颜色 + +```xml + + + + +``` + +如下截图为一组选中状态时的高亮对比结果,左图为样式`默认颜色`,右侧为个人`自定义颜色` + +![VisualElement.HighlightBrush](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/VisualElement.HighlightBrush.png) + +## Text 设置文本内容 + +可视化文本内容,主要用于微软`WPF`库中原生控件需要显示辅助文本,但并没有对应的文本内容显示属性时,通过控件的自定义样式时,使用此附加属性进行进行文本内容的显示。 + +例如:当自定义进度条,需要显示文本时,本身缺少显示额外文本内容的属性,可以通过自定样式显示对应文本,以`Text`作为文本内容承载属性 + +自定义样式: + +```xml + +``` + +`xaml`中的使用: + +```xml + + + +``` + +效果: + +![VisualElement.Text](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/attach/VisualElement.Text.png) \ No newline at end of file diff --git a/doc/source/handycontrol/attach/windowAttach/index.md b/doc/source/handycontrol/attach/windowAttach/index.md index ca12ad62..ecf59116 100644 --- a/doc/source/handycontrol/attach/windowAttach/index.md +++ b/doc/source/handycontrol/attach/windowAttach/index.md @@ -1,5 +1,56 @@ --- -title: 建设中 +title: WindowAttach 窗体专用 --- -建设中 \ No newline at end of file +# 属性 + +| 名称 | 用途 | +| ----------------- | ------------------------------------------------------------ | +| IsDragElement | 是否允许当前元素可拖动窗体 | +| IgnoreAltF4 | 是否忽略快捷键Alt和F4(键盘快速退出或者 结束 当前正在运行的应用程序) | +| ShowInTaskManager | 是否窗体显示到任务管理器中 | + +# 使用案例 + +对应`xaml`中添加`HandyControl`对应的命名空`xmlns:hc="https://handyorg.github.io/handycontrol"` + +```xml + + + + + + +