From 2539a1c77dc2eea73c23b995a27def3e884583ab Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Sun, 9 Aug 2020 14:22:09 +0800 Subject: [PATCH] add GotoTop, Gravatar and Grid docs --- .../extend_controls/gifImage/index.md | 1 - .../extend_controls/gotoTop/index.md | 38 +++- .../extend_controls/gravatar/index.md | 50 ++++- .../extend_controls/grid/index.md | 190 +++++++++++++++++- 4 files changed, 273 insertions(+), 6 deletions(-) diff --git a/doc/source/handycontrol/extend_controls/gifImage/index.md b/doc/source/handycontrol/extend_controls/gifImage/index.md index 86826bc3..2b2a37fe 100644 --- a/doc/source/handycontrol/extend_controls/gifImage/index.md +++ b/doc/source/handycontrol/extend_controls/gifImage/index.md @@ -22,7 +22,6 @@ public class GifImage : Image, IDisposable ![GifImage](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/GifImage.gif) - {% note warning %} 不再使用 `GifImage` 时记得调用 `Dispose` 方法清理资源。 {% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/gotoTop/index.md b/doc/source/handycontrol/extend_controls/gotoTop/index.md index ca12ad62..5554cc33 100644 --- a/doc/source/handycontrol/extend_controls/gotoTop/index.md +++ b/doc/source/handycontrol/extend_controls/gotoTop/index.md @@ -1,5 +1,39 @@ --- -title: 建设中 +title: GotoTop 回到顶部 --- -建设中 \ No newline at end of file +通过点击 `GotoTop` 可以让 `ScrollView` 或带有 `ScrollView` 的控件滚动到顶部位置. + +```cs +public class GotoTop : Button +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|Target|`ScrollView` 或带有 `ScrollView` 的控件||| +|Animated|是否使用动画|true|| +|AnimationTime|动画持续时间|0.2s|| +|HidingHeight|当 `ScrollView` 滚动该高度后 `GotoTop` 会被隐藏|0|| +|AutoHiding|是否自动隐藏|true||| + +# 案例 + +```xml + + + + + + + + + + + + + +``` + +![GotoTop](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/GoToTop.gif) \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/gravatar/index.md b/doc/source/handycontrol/extend_controls/gravatar/index.md index ca12ad62..fe7c0aac 100644 --- a/doc/source/handycontrol/extend_controls/gravatar/index.md +++ b/doc/source/handycontrol/extend_controls/gravatar/index.md @@ -1,5 +1,51 @@ --- -title: 建设中 +title: Gravatar 头像 --- -建设中 \ No newline at end of file +一种用户随机头像的实现方式. + +```cs +public class Gravatar : ContentControl +``` + +# 属性 + +|属性|描述|默认值|备注| +|-|-|-|-| +|Generator|头像生成器|GithubGravatarGenerator|| +|Id|用户Id||| +|Source|用户头像|||| + +# 样式 + +|样式|描述| +|-|-| +|GravatarBaseStyle|默认样式| +|GravatarCircle|圆形头像| +|GravatarCircleImg|圆形图片头像| + +# 案例 + +```xml + + + + + + + + + + + + + + + + + + + +``` + +![Gravatar](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Gravatar.gif) \ No newline at end of file diff --git a/doc/source/handycontrol/extend_controls/grid/index.md b/doc/source/handycontrol/extend_controls/grid/index.md index d52f1876..587d6bb6 100644 --- a/doc/source/handycontrol/extend_controls/grid/index.md +++ b/doc/source/handycontrol/extend_controls/grid/index.md @@ -1,3 +1,191 @@ --- -title: Grid +title: Grid 栅格 --- + +栅格系统的wpf实现,web版本可参考 [element/layout](https://element.eleme.cn/#/zh-CN/component/layout) + +```cs +public class Row : Panel +``` + +```cs +public class Col : ContentControl +``` + +# 属性 + +## Row 行 + +|属性|描述|默认值|备注| +|-|-|-|-| +|Gutter|栅格间隔|0||| + +## Col 列 + +|属性|描述|默认值|备注| +|-|-|-|-| +|Layout|布局方式||| +|Offset|栅格左侧的间隔格数|0|| +|Span|栅格占据的列数|24|| +|IsFixed|该列是否固定|false||| + +# 案例 + +```xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +``` + +![Grid](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Grid.gif) + +{% note info %} +xaml中 `Layout` 写法的3种方式: +Layout="{extension:ColLayout Xs=4, Sm=6, Md=8, Lg=9, Xl=11}" +Layout="4,6,8,9,11" +Layout="4 6 8 9 11" +{% endnote %} \ No newline at end of file