From 685bb075f2b74ad9a1dcf1cad5538866d7a1a98e Mon Sep 17 00:00:00 2001
From: NaBian <836904362@qq.com>
Date: Sat, 22 Aug 2020 10:27:50 +0800
Subject: [PATCH] update docs
---
.../extend_controls/simplePanel/index.md | 12 ++-
.../extend_controls/splitButton/index.md | 53 ++++++++++-
.../extend_controls/sprite/index.md | 42 ++++++++-
.../extend_controls/stepBar/index.md | 92 ++++++++++++++++++-
.../extend_controls/tabControl/index.md | 63 ++++++++++++-
.../handycontrol/extend_controls/tag/index.md | 64 ++++++++++++-
.../extend_controls/timeBar/index.md | 48 +++++++++-
.../extend_controls/timePicker/index.md | 2 +-
doc/themes/next/layout/_layout.swig | 1 -
9 files changed, 363 insertions(+), 14 deletions(-)
diff --git a/doc/source/handycontrol/extend_controls/simplePanel/index.md b/doc/source/handycontrol/extend_controls/simplePanel/index.md
index ca12ad62..41f96ba7 100644
--- a/doc/source/handycontrol/extend_controls/simplePanel/index.md
+++ b/doc/source/handycontrol/extend_controls/simplePanel/index.md
@@ -1,5 +1,13 @@
---
-title: 建设中
+title: SimplePanel 简单面板
---
-建设中
\ No newline at end of file
+当不需要Grid的行、列分隔等功能时建议用此轻量级类代替.
+
+```cs
+public class SimplePanel : Panel
+```
+
+{% note info %}
+大多数时候,我们要尽量避免使用重量级 `Panel`,`SimplePanel` 在HC中大量使用.
+{% endnote %}
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/splitButton/index.md b/doc/source/handycontrol/extend_controls/splitButton/index.md
index 532fd314..33f79879 100644
--- a/doc/source/handycontrol/extend_controls/splitButton/index.md
+++ b/doc/source/handycontrol/extend_controls/splitButton/index.md
@@ -1,3 +1,54 @@
---
-title: SplitButton
+title: SplitButton 分割按钮
---
+
+在普通按钮的基础上提供额外的点击项.
+
+```cs
+public class SplitButton : ButtonBase
+```
+
+# 属性
+
+|属性|描述|默认值|备注|
+|-|-|-|-|
+|HitMode|下拉框触发模式|HitMode.Click||
+|MaxDropDownHeight|下拉框最大高度|||
+|IsDropDownOpen|下拉框是否打开|false||
+|DropDownContent|下拉框内容||||
+
+# 案例
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/sprite/index.md b/doc/source/handycontrol/extend_controls/sprite/index.md
index 59360979..7e0b88e8 100644
--- a/doc/source/handycontrol/extend_controls/sprite/index.md
+++ b/doc/source/handycontrol/extend_controls/sprite/index.md
@@ -1,3 +1,43 @@
---
-title: Sprite
+title: Sprite 精灵
---
+
+可将常用功能集成到 `Sprite` 中而无需打开主程序.
+
+```cs
+public sealed class Sprite : System.Windows.Window
+```
+
+# 方法
+
+|名称|说明|
+|-|-|
+| Show(object) | 将内容作为控件主体,Pin 到桌面上 |
+
+# 案例
+
+```xml
+
+
+
+
+
+
+```
+
+```cs
+public partial class AppSprite
+{
+ public AppSprite()
+ {
+ InitializeComponent();
+ }
+}
+```
+
+```cs
+Sprite.Show(new AppSprite());
+```
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/stepBar/index.md b/doc/source/handycontrol/extend_controls/stepBar/index.md
index ca12ad62..f21fe2f2 100644
--- a/doc/source/handycontrol/extend_controls/stepBar/index.md
+++ b/doc/source/handycontrol/extend_controls/stepBar/index.md
@@ -1,5 +1,93 @@
---
-title: 建设中
+title: StepBar 步骤条
---
-建设中
\ No newline at end of file
+引导用户按照流程完成任务的分步导航条.
+
+```cs
+[StyleTypedProperty(Property = "ItemContainerStyle", StyleTargetType = typeof(StepBarItem))]
+[DefaultEvent("StepChanged")]
+[TemplatePart(Name = ElementProgressBarBack, Type = typeof(ProgressBar))]
+public class StepBar : ItemsControl
+```
+
+# 属性
+
+|属性|描述|默认值|备注|
+|-|-|-|-|
+|StepIndex|当前步骤序号|0||
+|Dock|步骤条顶靠方式|Dock.Top|||
+
+# 方法
+
+|名称|说明|
+|-|-|
+| Next( ) | 跳转到下一步 |
+| Prev( ) | 跳转到上一步 |
+
+# 事件
+
+|名称|说明|
+|-|-|
+| StepChanged | 步骤改变时触发 |
+
+# 案例
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/tabControl/index.md b/doc/source/handycontrol/extend_controls/tabControl/index.md
index ca12ad62..22844685 100644
--- a/doc/source/handycontrol/extend_controls/tabControl/index.md
+++ b/doc/source/handycontrol/extend_controls/tabControl/index.md
@@ -1,5 +1,64 @@
---
-title: 建设中
+title: TabControl 选项卡控件
---
-建设中
\ No newline at end of file
+HC 对wpf原生 `TabControl` 的扩展.
+
+```cs
+[TemplatePart(Name = OverflowButtonKey, Type = typeof(ContextMenuToggleButton))]
+[TemplatePart(Name = HeaderPanelKey, Type = typeof(TabPanel))]
+[TemplatePart(Name = OverflowScrollviewer, Type = typeof(ScrollViewer))]
+[TemplatePart(Name = ScrollButtonLeft, Type = typeof(ButtonBase))]
+[TemplatePart(Name = ScrollButtonRight, Type = typeof(ButtonBase))]
+[TemplatePart(Name = HeaderBorder, Type = typeof(Border))]
+public class TabControl : System.Windows.Controls.TabControl
+```
+
+# 属性
+
+|属性|描述|默认值|备注|
+|-|-|-|-|
+|IsAnimationEnabled|是否启用动画效果|false||
+|IsDraggable|选项卡是否支持拖动|false||
+|ShowCloseButton|选项卡上是否显示关闭按钮|false||
+|ShowContextMenu|选项卡是否支持上下文菜单|true||
+|IsTabFillEnabled|选项卡是否自动平分空间|false||
+|TabItemWidth|选项卡宽度|200||
+|TabItemHeight|选项卡高度|30||
+|IsScrollable|选项卡溢出后,是否支持鼠标滚轮滚动|false||
+|ShowOverflowButton|选项卡溢出后,是否显示下拉按钮|true||
+|ShowScrollButton|是否显示滚动按钮|false|||
+
+# 案例
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+
+## TabItem
+
+你可以使用 `IconElement` 类对选项卡设置图标.
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/tag/index.md b/doc/source/handycontrol/extend_controls/tag/index.md
index ca12ad62..14c74c63 100644
--- a/doc/source/handycontrol/extend_controls/tag/index.md
+++ b/doc/source/handycontrol/extend_controls/tag/index.md
@@ -1,5 +1,65 @@
---
-title: 建设中
+title: Tag 标签
---
-建设中
\ No newline at end of file
+用以指示用户选中的项,相对于文字,`Tag` 有额外的交互.
+
+```cs
+public class Tag : ContentControl
+```
+
+# 属性
+
+|属性|描述|默认值|备注|
+|-|-|-|-|
+|ShowCloseButton|是否显示删除(关闭)按钮|true||
+|Selectable|是否支持选中|false||
+|IsSelected|是否选中|false|||
+
+# 事件
+
+|名称|说明|
+|-|-|
+| Selected | 标签选中时触发 |
+| Closing | 标签关闭时触发 |
+| Closed | 标签关闭后触发 |
+
+# TagPanel
+
+标签专用容器.
+
+{% note warning %}
+即将在未来版本中移除,我们会提供功能更丰富的 `TagContainer` 来代替它.
+{% endnote %}
+
+## 属性
+
+|属性|描述|默认值|备注|
+|-|-|-|-|
+|ShowAddButton|是否显示新增标签按钮|false||
+|TagMargin|标签边距|Thickness(5)|||
+
+## 事件
+
+|名称|说明|
+|-|-|
+| AddTagButtonClick | 新增标签时触发 |
+
+# 案例
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/timeBar/index.md b/doc/source/handycontrol/extend_controls/timeBar/index.md
index ca12ad62..40a2b7bd 100644
--- a/doc/source/handycontrol/extend_controls/timeBar/index.md
+++ b/doc/source/handycontrol/extend_controls/timeBar/index.md
@@ -1,5 +1,49 @@
---
-title: 建设中
+title: TimeBar 时间条
---
-建设中
\ No newline at end of file
+一种包含热区和时间刻度的进度条.
+
+```cs
+[TemplatePart(Name = ElementBorderTop, Type = typeof(Border))]
+[TemplatePart(Name = ElementTextBlockMove, Type = typeof(TextBlock))]
+[TemplatePart(Name = ElementTextBlockSelected, Type = typeof(TextBlock))]
+[TemplatePart(Name = ElementCanvasSpe, Type = typeof(Canvas))]
+[TemplatePart(Name = ElementHotspots, Type = typeof(Panel))]
+public class TimeBar : Control
+```
+
+# 属性
+
+|属性|描述|默认值|备注|
+|-|-|-|-|
+|Hotspots|热区集合|||
+|HotspotsBrush|热区颜色|||
+|ShowSpeStr|是否显示刻度|false||
+|TimeFormat|时间格式|yyyy-MM-dd HH:mm:ss||
+|SelectedTime|当前选中时间||||
+
+# 事件
+
+|名称|说明|
+|-|-|
+| TimeChanged | 选中时间改变时触发 |
+
+# 案例
+
+```xml
+
+```
+
+
+
+## 设置热区
+
+```cs
+for (int i = 0; i < 10; i++)
+{
+ var hour = 6 * i;
+ TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(hour), DateTime.Today.AddHours(hour + 1)));
+ TimeBarDemo.Hotspots.Add(new DateTimeRange(DateTime.Today.AddHours(-hour), DateTime.Today.AddHours(-hour + 1)));
+}
+```
\ No newline at end of file
diff --git a/doc/source/handycontrol/extend_controls/timePicker/index.md b/doc/source/handycontrol/extend_controls/timePicker/index.md
index 5c65e872..bfacfcd0 100644
--- a/doc/source/handycontrol/extend_controls/timePicker/index.md
+++ b/doc/source/handycontrol/extend_controls/timePicker/index.md
@@ -1,5 +1,5 @@
---
-title: TimePicker
+title: TimePicker 时间选择器
---
TimePicker 控件允许用户通过在文本框中键入时间或使用下拉的日历控件来选择时间。
diff --git a/doc/themes/next/layout/_layout.swig b/doc/themes/next/layout/_layout.swig
index d2272196..9c3ff3b3 100644
--- a/doc/themes/next/layout/_layout.swig
+++ b/doc/themes/next/layout/_layout.swig
@@ -16,7 +16,6 @@
-
{{ partial('_partials/head/head.swig', {}, {cache: theme.cache.enable}) }}
{% include '_partials/head/head-unique.swig' %}
{% block title %}{% endblock %}