From 28c464a8e2bc5318f3957a41dae799b824554232 Mon Sep 17 00:00:00 2001 From: NaBian <836904362@qq.com> Date: Fri, 12 Apr 2019 00:03:03 +0800 Subject: [PATCH] add doc --- .../basic_xaml/behaviors/index.md | 8 +++- .../handycontrol/basic_xaml/brushes/index.md | 6 ++- .../handycontrol/basic_xaml/colors/index.md | 6 ++- .../basic_xaml/converters/index.md | 9 ++++ .../handycontrol/basic_xaml/effects/index.md | 17 ++++++- .../handycontrol/basic_xaml/fonts/index.md | 13 +++++- .../basic_xaml/geometries/index.md | 46 ++++++++++++++++++- .../handycontrol/basic_xaml/paths/index.md | 29 +++++++++++- .../handycontrol/basic_xaml/sizes/index.md | 13 +++++- .../Themes/Basic/Paths.xaml | 2 +- 10 files changed, 135 insertions(+), 14 deletions(-) diff --git a/doc/source/handycontrol/basic_xaml/behaviors/index.md b/doc/source/handycontrol/basic_xaml/behaviors/index.md index c67e9e5a..f800ba81 100644 --- a/doc/source/handycontrol/basic_xaml/behaviors/index.md +++ b/doc/source/handycontrol/basic_xaml/behaviors/index.md @@ -2,6 +2,8 @@ title: 行为 --- +# 流体移动 + | 名称 | 用途 | |-|-| | BehaviorXY200 | 流体移动行为,x、y轴运动,200毫秒结束动画 | @@ -9,4 +11,8 @@ title: 行为 | BehaviorY200 | 流体移动行为,y轴运动,200毫秒结束动画 | | BehaviorXY400 | 流体移动行为,x、y轴运动,400毫秒结束动画 | | BehaviorX400 | 流体移动行为,x轴运动,400毫秒结束动画 | -| BehaviorY400 | 流体移动行为,y轴运动,400毫秒结束动画 | \ No newline at end of file +| BehaviorY400 | 流体移动行为,y轴运动,400毫秒结束动画 | + +{% note info %} +用例:`controls:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}"` +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/brushes/index.md b/doc/source/handycontrol/basic_xaml/brushes/index.md index 4e128f8a..05cd9a74 100644 --- a/doc/source/handycontrol/basic_xaml/brushes/index.md +++ b/doc/source/handycontrol/basic_xaml/brushes/index.md @@ -33,4 +33,8 @@ title: 画刷 | AccentBrush | 提醒 | | DarkAccentBrush | 提醒(深色) | | DarkMaskBrush | 作为遮罩使用 | -| DarkOpacityBrush | 半透明背景 | \ No newline at end of file +| DarkOpacityBrush | 半透明背景 | + +{% note info %} +用例:`Foreground="{DynamicResource PrimaryBrush}"` +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/colors/index.md b/doc/source/handycontrol/basic_xaml/colors/index.md index a15a3ce0..88de4115 100644 --- a/doc/source/handycontrol/basic_xaml/colors/index.md +++ b/doc/source/handycontrol/basic_xaml/colors/index.md @@ -43,4 +43,8 @@ title: 颜色 | DarkAccentColor | 提醒(深色) | | DarkMaskColor | 作为遮罩使用 | | DarkOpacityColor | 半透明背景 | -| BlurGradientValue | 仅用于模糊窗口的背景 | \ No newline at end of file +| BlurGradientValue | 仅用于模糊窗口的背景 | + +{% note info %} +用例:`Color="{DynamicResource PrimaryColor}"` +{% 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 d055ad0e..b17ea0fd 100644 --- a/doc/source/handycontrol/basic_xaml/converters/index.md +++ b/doc/source/handycontrol/basic_xaml/converters/index.md @@ -61,3 +61,12 @@ title: 转换器 # TreeViewItemMarginConverter(内部使用) 该转换器用于为TreeViewItem提供适当的左边距。 + +{% note info %} +用例: + +{% code %} +Visibility="{Binding ShowButton,Converter={StaticResource Boolean2VisibilityConverter}}" +{% endcode %} + +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/effects/index.md b/doc/source/handycontrol/basic_xaml/effects/index.md index ca12ad62..5bdfd1c7 100644 --- a/doc/source/handycontrol/basic_xaml/effects/index.md +++ b/doc/source/handycontrol/basic_xaml/effects/index.md @@ -1,5 +1,18 @@ --- -title: 建设中 +title: 效果 --- -建设中 \ No newline at end of file +# 阴影 +目前只包含5个级别的阴影效果: + +| 名称 | 半径 | +|-|-| +| EffectShadow1 | 5 | +| EffectShadow2 | 8 | +| EffectShadow3 | 14 | +| EffectShadow4 | 25 | +| EffectShadow5 | 35 | + +{% note info %} +用例:`Effect="{StaticResource EffectShadow5}"` +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/fonts/index.md b/doc/source/handycontrol/basic_xaml/fonts/index.md index ca12ad62..4b5340af 100644 --- a/doc/source/handycontrol/basic_xaml/fonts/index.md +++ b/doc/source/handycontrol/basic_xaml/fonts/index.md @@ -1,5 +1,14 @@ --- -title: 建设中 +title: 字体大小 --- -建设中 \ No newline at end of file +| 名称 | 大小 | 用途 | +|-|-| +| LargeFontSize | 24 | 页面标题 | +| HeadFontSize | 20 | 功能标题 | +| SubHeadFontSize | 16 | 子功能标题 | +| TextFontSize | 12 | 文本 | + +{% note info %} +用例:`FontSize="{StaticResource LargeFontSize}"` +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/geometries/index.md b/doc/source/handycontrol/basic_xaml/geometries/index.md index ca12ad62..9da1ee57 100644 --- a/doc/source/handycontrol/basic_xaml/geometries/index.md +++ b/doc/source/handycontrol/basic_xaml/geometries/index.md @@ -1,5 +1,47 @@ --- -title: 建设中 +title: 几何形状 --- -建设中 \ No newline at end of file +HandyControl中自带了一些几何形状定义,但要应用于生产中显然不够。我们不准备包罗万象,这永远没有底,所以我们就反其道而行,只包含了控件库自己要用的(当然用户也可使用),其余请自行扩展。下表中列出了控件库中所有的形状定义: + +| 名称 | 描述 | +|-|-| +| CalendarGeometry | 日历 | +| DeleteGeometry | 删除 | +| DeleteFillCircleGeometry | 删除(圆形填充) | +| CloseGeometry | 关闭 | +| DownGeometry | 下 | +| UpGeometry | 上 | +| ClockGeometry | 时钟 | +| LeftGeometry | 左 | +| RightGeometry | 右 | +| RotateLeftGeometry | 向左旋转 | +| EnlargeGeometry | 放大 | +| ReduceGeometry | 缩小 | +| DownloadGeometry | 下载 | +| SaveGeometry | 保存 | +| WindowsGeometry | 窗口 | +| FullScreenGeometry | 全屏 | +| FullScreenReturnGeometry | 全屏返回 | +| SearchGeometry | 搜索 | +| UpDownGeometry | 上和下的组合 | +| WindowMinGeometry | 窗口最小化 | +| WindowRestoreGeometry | 窗口还原 | +| WindowMaxGeometry | 窗口最大化 | +| AudioGeometry | 声音 | +| BubbleTailGeometry | 气泡的尾巴 | +| StarGeometry | 爱心 | +| AddGeometry | 加 | +| SubGeometry | 减 | +| WarningGeometry | 警告 | +| InfoGeometry | 信息 | +| ErrorGeometry | 错误 | +| SuccessGeometry | 成功 | +| FatalGeometry | 严重 | +| AskGeometry | 询问 | +| AllGeometry | 所有 | +| DragGeometry | 拖拽(用于工具条) | + +{% note info %} +用例:`Data="{StaticResource DragGeometry}"` +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/paths/index.md b/doc/source/handycontrol/basic_xaml/paths/index.md index ca12ad62..5335c7be 100644 --- a/doc/source/handycontrol/basic_xaml/paths/index.md +++ b/doc/source/handycontrol/basic_xaml/paths/index.md @@ -1,5 +1,30 @@ --- -title: 建设中 +title: Path路径 --- -建设中 \ No newline at end of file +和几何形状一样,我们不准备包罗万象,只求所需。下表中列出了控件库中所有的Path路径: + +| 名称 | 描述 | +|-|-| +| PathBaseStyle | Path路径基样式 | +| SearchPathStyle | 搜索 | +| FullScreenReturnPathStyle | 全屏返回 | +| FullScreenPathStyle | 全屏 | +| WindowsPathStyle | 窗口 | +| SavePathStyle | 保存 | +| DownloadPathStyle | 下载 | +| EnlargePathStyle | 放大 | +| ReducePathStyle | 缩小 | +| RotatePathStyle | 向左旋转(默认) | +| CalendarPathStyle | 日历 | +| DeletePathStyle | 删除 | +| ClosePathStyle | 关闭 | +| DownPathStyle | 下 | +| ClockPathStyle | 时钟 | +| LeftPathStyle | 向左 | +| RightPathStyle | 向右 | +| UpDownPathStyle | 上和下的组合 | + +{% note info %} +用例:`Style="{StaticResource SearchPathStyle}"` +{% endnote %} \ No newline at end of file diff --git a/doc/source/handycontrol/basic_xaml/sizes/index.md b/doc/source/handycontrol/basic_xaml/sizes/index.md index ca12ad62..2846cfe7 100644 --- a/doc/source/handycontrol/basic_xaml/sizes/index.md +++ b/doc/source/handycontrol/basic_xaml/sizes/index.md @@ -1,5 +1,14 @@ --- -title: 建设中 +title: 尺寸 --- -建设中 \ No newline at end of file +| 名称 | 类型 | 值 | 描述 | +|-|-| +| DefaultControlHeight | System.Double | 30 | 默认控件高度 | +| DefaultControlPadding | System.Windows.Thickness | 12,6 | 默认控件内边距 | +| DefaultInputPadding | System.Windows.Thickness | 8,6 |默认输入控件内边距 | +| DefaultCornerRadius | System.Windows.CornerRadius | 4 | 默认圆角 | + +{% note info %} +用例:`CornerRadius="{StaticResource DefaultCornerRadius}"` +{% endnote %} \ No newline at end of file diff --git a/src/Shared/HandyControl_Shared/Themes/Basic/Paths.xaml b/src/Shared/HandyControl_Shared/Themes/Basic/Paths.xaml index e7ac23ad..85d96506 100644 --- a/src/Shared/HandyControl_Shared/Themes/Basic/Paths.xaml +++ b/src/Shared/HandyControl_Shared/Themes/Basic/Paths.xaml @@ -106,7 +106,7 @@ - +