diff --git a/doc/source/handycontrol/extend_controls/index.md b/doc/source/handycontrol/extend_controls/index.md index 50f12809..194eea17 100644 --- a/doc/source/handycontrol/extend_controls/index.md +++ b/doc/source/handycontrol/extend_controls/index.md @@ -2,4 +2,8 @@ title: 扩展控件 --- -HandyControl目前包含80余款扩展控件,正逐步增加。 \ No newline at end of file +HandyControl目前包含80余款扩展控件,正逐步增加。 + +{% note warning %} +各控件案例中所使用的资源均可在HC Demo中找到,请养成在vs中使用 `Ctrl+F` 组合键的习惯. +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/searchBar/index.md b/doc/source/handycontrol/extend_controls/searchBar/index.md index ca12ad62..a69adfb7 100644 --- a/doc/source/handycontrol/extend_controls/searchBar/index.md +++ b/doc/source/handycontrol/extend_controls/searchBar/index.md @@ -1,5 +1,74 @@ --- -title: 建设中 +title: SearchBar 搜索栏 --- -建设中 \ No newline at end of file +通过键入关键字触发搜索. + +```cs +public class SearchBar : TextBox, ICommandSource +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|IsRealTime|是否实时搜索|false|如果为`true`则每次输入都会自动触发搜索开始事件| +|Command|命令||| +|CommandParameter|命令参数||| +|CommandTarget|命令目标元素|||| + +# 附加属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|InfoElement.Placeholder|占位符||| +|InfoElement.Necessary|是否必填|false|| +|InfoElement.Symbol|必填标记|●|| +|InfoElement.ContentHeight|内容高度|30|标题在上时可用| +|InfoElement.MinContentHeight|最小内容高度|30|标题在上时可用| +|TitleElement.Title|标题||| +|TitleElement.TitlePlacement|标题对齐方式|TitlePlacementType.Top|| +|TitleElement.TitleWidth|标题宽度|120||| + +# 事件 + +|名称|说明| +|-|-| +| SearchStarted | 搜索开始时触发 | + +# 样式 + +|样式|描述| +|-|-| +|SearchBarBaseStyle|默认样式| +|SearchBarExtendBaseStyle|默认扩展样式| +|SearchBarPlusBaseStyle|默认加强样式| +|SearchBarExtend|扩展样式| +|SearchBarPlus|加强样式| + +# 案例 + +```xml + + + + + + + + + + + + + + + + + + + + +``` + +![SearchBar](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/SearchBar.png) \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/shield/index.md b/doc/source/handycontrol/extend_controls/shield/index.md index ca12ad62..9f03bcd1 100644 --- a/doc/source/handycontrol/extend_controls/shield/index.md +++ b/doc/source/handycontrol/extend_controls/shield/index.md @@ -1,5 +1,32 @@ --- -title: 建设中 +title: Shield 徽章 --- -建设中 \ No newline at end of file +徽章由左半部分的名称和右半部分的值组成,点击徽章可以打开对应的链接. + +```cs +[ContentProperty(nameof(Status))] +public class Shield : ButtonBase +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|Subject|名称||| +|Status|值||| +|Color|颜色|||| + +# 案例 + +```xml + + + + + + + +``` + +![Shield](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Shield.png) \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/sideMenu/index.md b/doc/source/handycontrol/extend_controls/sideMenu/index.md index c7cc2051..f4341f42 100644 --- a/doc/source/handycontrol/extend_controls/sideMenu/index.md +++ b/doc/source/handycontrol/extend_controls/sideMenu/index.md @@ -1,3 +1,187 @@ --- -title: SideMenu +title: SideMenu 侧边菜单 --- + +当界面为左右布局时,可以使用侧边菜单来导航. + +{% note warning %} +目前侧边菜单只支持垂直布局,将来可能扩展为任意布局. +{% endnote %} + +```cs +[DefaultProperty("Items")] +[ContentProperty("Items")] +[TemplatePart(Name = ElementPanel, Type = typeof(Panel))] +public class SimpleItemsControl : Control +``` + +```cs +public class HeaderedSimpleItemsControl : SimpleItemsControl +``` + +```cs +public class SideMenu : HeaderedSimpleItemsControl +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|AutoSelect|是否自动选中首项|true|| +|ExpandMode|子项展开模式|ExpandMode.ShowOne|| +|PanelAreaLength|子项容器高度|NaN|目前侧边菜单只支持垂直布局,将来可能扩展为任意布局,故此属性名称没有定为`PanelAreaHeight`| + +# 事件 + +|名称|说明| +|-|-| +| SelectionChanged | 选中项改变时触发 | + +# 案例 + +```xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +![SideMenu](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/SideMenu.png) \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/simpleItemsControl/index.md b/doc/source/handycontrol/extend_controls/simpleItemsControl/index.md index ca12ad62..727080fd 100644 --- a/doc/source/handycontrol/extend_controls/simpleItemsControl/index.md +++ b/doc/source/handycontrol/extend_controls/simpleItemsControl/index.md @@ -1,5 +1,22 @@ --- -title: 建设中 +title: SimpleItemsControl 简单项目控件 --- -建设中 \ No newline at end of file +一种轻量级ItemsControl控件. + +```cs +[DefaultProperty("Items")] +[ContentProperty("Items")] +[TemplatePart(Name = ElementPanel, Type = typeof(Panel))] +public class SimpleItemsControl : Control +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|ItemTemplate|项目模板||| +|ItemContainerStyle|项目容器样式||| +|ItemsSource|项目资源||| +|Items|项目||| +|HasItems|是否有项目|false|| \ No newline at end of file