add doc
This commit is contained in:
1 parent
16ef430a39
commit
792897291b
445 files changed
+30584
-5
No files matched your search
+1
-5
@@ -17,8 +17,4 @@ src/Net_GE45/HandyControl_Net_GE45/bin
|
||||
src/Net_GE45/HandyControl_Net_GE45/obj
|
||||
src/Net_GE45/HandyControlDemo_Net_GE45/bin
|
||||
src/Net_GE45/HandyControlDemo_Net_GE45/obj
|
||||
*.user
|
||||
/.vs/HandyControl/v16/.suo
|
||||
/.vs/ProjectSettings.json
|
||||
/.vs/VSWorkspaceState.json
|
||||
/.vs/slnx.sqlite
|
||||
*.user
|
||||
@@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
db.json
|
||||
*.log
|
||||
node_modules/
|
||||
public/
|
||||
.deploy*/
|
||||
@@ -0,0 +1,87 @@
|
||||
# Hexo Configuration
|
||||
## Docs: https://hexo.io/docs/configuration.html
|
||||
## Source: https://github.com/hexojs/hexo/
|
||||
|
||||
# Site
|
||||
title: HandyOrg
|
||||
subtitle: everything can be handy
|
||||
description: everything can be handy
|
||||
keywords:
|
||||
author: HandyOrg
|
||||
language: zh-CN
|
||||
timezone:
|
||||
|
||||
# URL
|
||||
## If your site is put in a subdirectory, set url as 'http://yoursite.com/child' and root as '/child/'
|
||||
url: http://yoursite.com
|
||||
root: /
|
||||
permalink: :year/:month/:day/:title/
|
||||
permalink_defaults:
|
||||
|
||||
# Directory
|
||||
source_dir: source
|
||||
public_dir: public
|
||||
tag_dir: tags
|
||||
archive_dir: archives
|
||||
category_dir: categories
|
||||
code_dir: downloads/code
|
||||
i18n_dir: :lang
|
||||
skip_render:
|
||||
|
||||
# Writing
|
||||
new_post_name: :title.md # File name of new posts
|
||||
default_layout: post
|
||||
titlecase: false # Transform title into titlecase
|
||||
external_link: true # Open external links in new tab
|
||||
filename_case: 0
|
||||
render_drafts: false
|
||||
post_asset_folder: false
|
||||
relative_link: false
|
||||
future: true
|
||||
highlight:
|
||||
enable: true
|
||||
line_number: true
|
||||
auto_detect: false
|
||||
tab_replace:
|
||||
|
||||
# Home page setting
|
||||
# path: Root path for your blogs index page. (default = '')
|
||||
# per_page: Posts displayed per page. (0 = disable pagination)
|
||||
# order_by: Posts order. (Order by date descending by default)
|
||||
index_generator:
|
||||
path: ''
|
||||
per_page: 10
|
||||
order_by: -date
|
||||
|
||||
# Category & Tag
|
||||
default_category: uncategorized
|
||||
category_map:
|
||||
tag_map:
|
||||
|
||||
# Date / Time format
|
||||
## Hexo uses Moment.js to parse and display date
|
||||
## You can customize the date format as defined in
|
||||
## http://momentjs.com/docs/#/displaying/format/
|
||||
date_format: YYYY-MM-DD
|
||||
time_format: HH:mm:ss
|
||||
|
||||
# Pagination
|
||||
## Set per_page to 0 to disable pagination
|
||||
per_page: 10
|
||||
pagination_dir: page
|
||||
|
||||
# Extensions
|
||||
## Plugins: https://hexo.io/plugins/
|
||||
## Themes: https://hexo.io/themes/
|
||||
theme: next
|
||||
|
||||
# Deployment
|
||||
## Docs: https://hexo.io/docs/deployment.html
|
||||
deploy:
|
||||
type:
|
||||
|
||||
search:
|
||||
path: search.xml
|
||||
field: page
|
||||
format: html
|
||||
limit: 10000
|
||||
Generated
+3875
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "hexo-site",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"hexo": {
|
||||
"version": "3.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"hexo": "^3.8.0",
|
||||
"hexo-generator-archive": "^0.1.5",
|
||||
"hexo-generator-category": "^0.1.3",
|
||||
"hexo-generator-index": "^0.2.1",
|
||||
"hexo-generator-searchdb": "^1.0.8",
|
||||
"hexo-generator-tag": "^0.2.0",
|
||||
"hexo-renderer-ejs": "^0.3.1",
|
||||
"hexo-renderer-marked": "^0.3.2",
|
||||
"hexo-renderer-stylus": "^0.3.3",
|
||||
"hexo-server": "^0.3.3"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
tags:
|
||||
---
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
---
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: {{ title }}
|
||||
date: {{ date }}
|
||||
tags:
|
||||
---
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: 欢迎来到HandyOrg
|
||||
---
|
||||
|
||||
HandyOrg的宗旨是为用户提供最简单的API。
|
||||
|
||||
目前组织成员只有一人。
|
||||
|
||||
我们一直期待着有更多的同学加入。
|
||||
|
||||
我们的入坑要求:
|
||||
- 热爱编码
|
||||
- 接受目前Handy的代码风格,并尽量遵守
|
||||
- 项目名必须以Handy为前缀
|
||||
- 活着
|
||||
|
||||
我们的QQ群:714704041
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: 行为
|
||||
---
|
||||
|
||||
| 名称 | 用途 |
|
||||
|-|-|
|
||||
| BehaviorXY200 | 流体移动行为,x、y轴运动,200毫秒结束动画 |
|
||||
| BehaviorX200 | 流体移动行为,x轴运动,200毫秒结束动画 |
|
||||
| BehaviorY200 | 流体移动行为,y轴运动,200毫秒结束动画 |
|
||||
| BehaviorXY400 | 流体移动行为,x、y轴运动,400毫秒结束动画 |
|
||||
| BehaviorX400 | 流体移动行为,x轴运动,400毫秒结束动画 |
|
||||
| BehaviorY400 | 流体移动行为,y轴运动,400毫秒结束动画 |
|
||||
@@ -0,0 +1,36 @@
|
||||
---
|
||||
title: 画刷
|
||||
---
|
||||
|
||||
画刷基于颜色,现有的画刷定义如下:
|
||||
|
||||
| 名称 | 用途 |
|
||||
|-|-|
|
||||
| PrimaryBrush | 主色调 |
|
||||
| DarkPrimaryBrush | 主色调(深色) |
|
||||
| DangerBrush | 错误、危险 |
|
||||
| DarkDangerBrush | 错误、危险(深色) |
|
||||
| WarningBrush | 警告 |
|
||||
| DarkWarningBrush | 警告(深色) |
|
||||
| InfoBrush | 信息 |
|
||||
| DarkInfoBrush | 信息(深色) |
|
||||
| SuccessBrush | 成功 |
|
||||
| DarkSuccessBrush | 成功(深色) |
|
||||
| PrimaryTextBrush | 主文本 |
|
||||
| SecondaryTextBrush | 次级文本 |
|
||||
| ThirdlyTextBrush | 末级文本 |
|
||||
| ReverseTextBrush | 反色文本 |
|
||||
| TextIconBrush | 一般用于深色背景下的文字或图标 |
|
||||
| BorderBrush | 边框 |
|
||||
| SecondaryBorderBrush | 次级边框 |
|
||||
| BackgroundBrush | 主背景色 |
|
||||
| RegionBrush | 区域块背景 |
|
||||
| SecondaryRegionBrush | 次级区域块背景 |
|
||||
| ThirdlyRegionBrush | 末级区域块背景 |
|
||||
| TitleBrush | 标题背景 |
|
||||
| DefaultBrush | 默认颜色 |
|
||||
| DarkDefaultBrush | 次级默认颜色 |
|
||||
| AccentBrush | 提醒 |
|
||||
| DarkAccentBrush | 提醒(深色) |
|
||||
| DarkMaskBrush | 作为遮罩使用 |
|
||||
| DarkOpacityBrush | 半透明背景 |
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: 颜色
|
||||
---
|
||||
|
||||
内置的颜色xaml定义有3个,对它们的描述如下表所示:
|
||||
|
||||
| 名称 | 用途 |
|
||||
|-|-|
|
||||
| Colors.xaml | 默认配置 |
|
||||
| ColorsDark.xaml | 暗色配置 |
|
||||
| ColorsViolet.xaml | 紫色配置 |
|
||||
|
||||
每个文件中定义了相同的颜色名称,只是颜色值不同,对颜色名称的描述如下表所示:
|
||||
|
||||
| 名称 | 用途 |
|
||||
|-|-|
|
||||
| PrimaryColor | 主色调 |
|
||||
| DarkPrimaryColor | 主色调(深色) |
|
||||
| DangerColor | 错误、危险 |
|
||||
| DarkDangerColor | 错误、危险(深色) |
|
||||
| WarningColor | 警告 |
|
||||
| DarkWarningColor | 警告(深色) |
|
||||
| InfoColor | 信息 |
|
||||
| DarkInfoColor | 信息(深色) |
|
||||
| SuccessColor | 成功 |
|
||||
| DarkSuccessColor | 成功(深色) |
|
||||
| PrimaryTextColor | 主文本 |
|
||||
| SecondaryTextColor | 次级文本 |
|
||||
| ThirdlyTextColor | 末级文本 |
|
||||
| ReverseTextColor | 反色文本 |
|
||||
| TextIconColor | 一般用于深色背景下的文字或图标 |
|
||||
| BorderColor | 边框 |
|
||||
| SecondaryBorderColor | 次级边框 |
|
||||
| BackgroundColor | 主背景色 |
|
||||
| RegionColor | 区域块背景 |
|
||||
| SecondaryRegionColor | 次级区域块背景 |
|
||||
| ThirdlyRegionColor | 末级区域块背景 |
|
||||
| TitleColor | 标题背景 |
|
||||
| SecondaryTitleColor | 次级标题背景 |
|
||||
| DefaultColor | 默认颜色 |
|
||||
| DarkDefaultColor | 次级默认颜色 |
|
||||
| AccentColor | 提醒 |
|
||||
| DarkAccentColor | 提醒(深色) |
|
||||
| DarkMaskColor | 作为遮罩使用 |
|
||||
| DarkOpacityColor | 半透明背景 |
|
||||
| BlurGradientValue | 仅用于模糊窗口的背景 |
|
||||
@@ -0,0 +1,63 @@
|
||||
---
|
||||
title: 转换器
|
||||
---
|
||||
|
||||
# Boolean2BooleanReConverter
|
||||
|
||||
该转换器用于反转布尔类型
|
||||
|
||||
# Boolean2StrConverter
|
||||
|
||||
该转换器需要提供一个字符串作为参数,该字符串的一般形式为:`[字符串0];[字符串1]`,当转换器获取的值为`true`时,会返回`[字符串0]`,否则返回`[字符串1]`。
|
||||
|
||||
# Boolean2VisibilityConverter
|
||||
|
||||
该转换器会将`true`转换为`Visible`,会将`false`转换为`Collapse`
|
||||
|
||||
# Boolean2VisibilityReConverter
|
||||
|
||||
该转换器情况与`Boolean2VisibilityConverter`相反。
|
||||
|
||||
# BooleanArr2VisibilityConverter
|
||||
|
||||
该转换器会将布尔数组转换为`Visibility`,当数组内全部为`true`时,返回`Visible`,否则返回`Collapse`。
|
||||
|
||||
# BorderCircularConverter
|
||||
|
||||
该转换器为Border专用,接受`Border`的长和宽合成的一个整型数组,返回它们中最小值的一半,作为圆形Border的半径。
|
||||
|
||||
# BorderClipConverter
|
||||
|
||||
该转换器为Border专用,接受一个object数组,该数组长度为3,分别对应Border的长、宽和圆角半径,它会返回一个圆形几何形状作为Clip来剪裁Border。
|
||||
|
||||
# Color2ChannelAConverter(内部使用)
|
||||
|
||||
该转换器会提取`SolidColorBrush.Color`的透明通道(A)的值。
|
||||
|
||||
# Color2HexStrConverter
|
||||
|
||||
该转换器会将`SolidColorBrush`转换为16进制字符串形式(带“#”)。
|
||||
|
||||
# Int2StrConverter
|
||||
|
||||
该转换器需要提供一个字符串作为参数,该字符串的一般形式为:`[字符串0];[字符串1];...[字符串n]`,转换器会将一个整型的值作为索引,来获取指定位置的字符串并返回。
|
||||
|
||||
# Long2FileSizeConverter
|
||||
|
||||
该转换器会将长整型转换为文件大小的字符串。
|
||||
|
||||
# Object2BooleanConverter
|
||||
|
||||
如果该转换器获取到的值为`null`则返回`false`,否则返回`true`。
|
||||
|
||||
# String2VisibilityConverter
|
||||
|
||||
该转换器接受一个字符串,如果该字符串为空或者为null,则返回`Collapse`,否则返回`Visible`。
|
||||
|
||||
# String2VisibilityReConverter
|
||||
|
||||
该转换器情况与`String2VisibilityConverter`相反。
|
||||
|
||||
# TreeViewItemMarginConverter(内部使用)
|
||||
|
||||
该转换器用于为TreeViewItem提供适当的左边距。
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: 基础xaml定义
|
||||
---
|
||||
|
||||
基础xaml定义都在Basic文件夹中,其内部结构如下:
|
||||

|
||||
|
||||
对它们的描述如下表所示:
|
||||
|
||||
| 名称 | 用途 |
|
||||
|-|-|
|
||||
| Colors | 包含内置的3个颜色定义文件 |
|
||||
| Basic.xaml | 包装好的基础xaml定义 |
|
||||
| Behaviors.xaml | 包含所有的行为定义 |
|
||||
| Brushes.xaml | 包含所有的画刷定义 |
|
||||
| Converters.xaml | 包含所有的转换器定义 |
|
||||
| Effects.xaml | 包含所有的效果定义 |
|
||||
| Fonts.xaml | 包含所有的字体大小定义 |
|
||||
| Geometries.xaml | 包含所有的几何形状定义,多用于Path |
|
||||
| Paths.xaml | 包含所有的Path路径定义 |
|
||||
| Sizes.xaml | 包含所有的尺寸定义 |
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: GrowlInfo
|
||||
date: 2019-04-02 22:16:16
|
||||
---
|
||||
|
||||
{% note info no-icon %}
|
||||
class
|
||||
{% endnote %}
|
||||
|
||||
{% note info no-icon %}
|
||||
Growl消息初始化模型
|
||||
{% endnote %}
|
||||
|
||||
|成员名|类型|说明|默认值|
|
||||
|-|-|-|-|
|
||||
| Message | string | 通知内容 | - |
|
||||
| ShowDateTime | bool | 是否显示通知时间 | true |
|
||||
| WaitTime | int | 等待自动关闭时间 | 6 |
|
||||
| CancelStr | string | 取消字符串 | Lang.Cancel |
|
||||
| ConfirmStr | string | 确认字符串 | Lang.Confirm |
|
||||
| ActionBeforeClose | Func<bool, bool> | 关闭前的委托 | - |
|
||||
| StaysOpen | bool | 保持打开 | false |
|
||||
| IsCustom | bool | 是否自定义行为 | false |
|
||||
| Type | InfoType | 消息类型 | InfoType.Success |
|
||||
| IconKey | string | 图标键名 | - |
|
||||
| IconBrushKey | string | 图标画刷键名 | - |
|
||||
| ShowCloseButton | bool | 是否显示关闭按钮 | true |
|
||||
| Token | string | 消息标记 | - |
|
||||
|
||||
## FAQ
|
||||
|
||||
{% note info no-icon %}
|
||||
这里的IconKey和IconBrushKey我该填什么啊?
|
||||
{% endnote %}
|
||||
|
||||
IconKey必须填资源类型为`Geometry`的Key名,例如以下的资源,它的Key名`GitterGeometry`就可以作为IconKey:
|
||||
``` xml
|
||||
<Geometry x:Key="GitterGeometry">M260.8 645H160V0h100.8v645zM461.8 152.2h-100.8V1024h100.8V152.2z m201.2 0h-100.8V1024h100.8V152.2zM864 152h-100.8v494H864V152z</Geometry>
|
||||
```
|
||||
|
||||
IconBrushKey必须填资源类型为`Brush`的Key名,例如以下的资源,它的Key名`ToolBarBackground`就可以作为IconBrushKey:
|
||||
``` xml
|
||||
<LinearGradientBrush x:Key="ToolBarBackground" EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
<GradientStop Color="#F5F4F5" Offset="0"/>
|
||||
<GradientStop Color="#D1CFD1" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
```
|
||||
@@ -0,0 +1,21 @@
|
||||
---
|
||||
title: InfoType
|
||||
date: 2019-04-02 22:27:13
|
||||
---
|
||||
|
||||
{% note info no-icon %}
|
||||
enum(int)
|
||||
{% endnote %}
|
||||
|
||||
{% note info no-icon %}
|
||||
消息类型
|
||||
{% endnote %}
|
||||
|
||||
|成员名|值|说明|
|
||||
|-|-|-|
|
||||
| Success | 0 | 成功 |
|
||||
| Info | 1 | 信息 |
|
||||
| Warning | 2 | 警告 |
|
||||
| Error | 3 | 错误 |
|
||||
| Fatal | 4 | 严重 |
|
||||
| Ask | 5 | 询问 |
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
title: Growl 信息通知
|
||||
---
|
||||
|
||||
当需要在窗口的右侧区域,以从上到下排列通知信息时可以使用本控件。
|
||||
|
||||
## 控件效果
|
||||
|
||||

|
||||
|
||||
## 准备工作
|
||||
|
||||
在指定的窗口右侧区域添加`StackPanel`容器
|
||||
``` xml
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
|
||||
<StackPanel VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</ScrollViewer>
|
||||
```
|
||||
为了方便滚动,一般会在外层包一个`ScrollViewer`,同时为了美观,我们设置`ScrollViewer`的`VerticalScrollBarVisibility="Hidden"`,最好给`StackPanel`添加一个合适的`Margin`,也是为了美观。
|
||||
|
||||
## 基础用法
|
||||
|
||||
第一步:将`StackPanel`设置为`Growl`的容器
|
||||
|
||||
``` xml
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
|
||||
<StackPanel controls:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</ScrollViewer>
|
||||
```
|
||||
{% note warning %}
|
||||
注意代码中的`controls:Growl.GrowlParent="True"`。
|
||||
{% endnote %}
|
||||
|
||||
第二步:调用`Growl`的相关接口来显示指定的消息
|
||||
|
||||
{% note info %}
|
||||
例如:`Growl.Success("文件保存成功!");`
|
||||
{% endnote %}
|
||||
|
||||
## 只在激活中的窗口显示信息通知
|
||||
|
||||
为需要显示信息通知的窗口重写`OnActivated`和`OnDeactivated`方法,在`OnActivated`中调用`Growl.SetGrowlParent(GrowlPanel, true);`,在`OnDeactivated`中调用`Growl.SetGrowlParent(GrowlPanel, false);`
|
||||
|
||||
{% note warning %}
|
||||
其中`GrowlPanel`是信息通知容器,类型推荐是`StackPanel`
|
||||
{% endnote %}
|
||||
|
||||
{% note warning %}
|
||||
这里需要说明一下,一个窗口对应一个`StackPanel`容器,Growl内部会维护一个变量用以存储这个容器,在每次通知触发时,会向这个容器中插入Growl的实例,也就是说,每次调用`Growl.SetGrowlParent(GrowlPanel, true);`时,`GrowlPanel`会成为内部的那个变量。
|
||||
{% endnote %}
|
||||
|
||||
{% note warning %}
|
||||
这种情况下就不需要在xaml中设置`controls:Growl.GrowlParent="True"`了。
|
||||
{% endnote %}
|
||||
|
||||
## 在任意的`StackPanel`容器中显示信息通知
|
||||
|
||||
第一步:为`StackPanel`容器赋予消息标记:SuccessMsg
|
||||
``` xml
|
||||
<ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right">
|
||||
<StackPanel controls:Growl.Token="SuccessMsg" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</ScrollViewer>
|
||||
```
|
||||
{% note warning %}
|
||||
注意代码中的`controls:Growl.Token="SuccessMsg"`。
|
||||
{% endnote %}
|
||||
|
||||
第二步:使用消息标记:SuccessMsg,并调用`Growl`的相关接口来显示指定的消息
|
||||
|
||||
{% note info %}
|
||||
例如:`Growl.Success("文件保存成功!", "SuccessMsg");`
|
||||
{% endnote %}
|
||||
|
||||
{% note warning %}
|
||||
现在"文件保存成功!"这则消息只会发送到拥有"SuccessMsg"消息标记的`StackPanel`容器中。
|
||||
{% endnote %}
|
||||
|
||||
## 属性
|
||||
|
||||
|名称|说明|
|
||||
|-|-|
|
||||
| GrowlPanel | 当前使用的消息容器 |
|
||||
|
||||
## 附加属性
|
||||
|
||||
|名称|说明|
|
||||
|-|-|
|
||||
| Token | 用于设置消息标记 |
|
||||
| GrowlParent | 用于设置消息容器 |
|
||||
|
||||
## 方法
|
||||
|
||||
|名称|说明|
|
||||
|-|-|
|
||||
| Success(string) | 显示一则成功通知 |
|
||||
| Success(string, string) | 使用指定的消息标记显示一则成功通知 |
|
||||
| Success(GrowlInfo) | 使用完整的消息初始化模型显示一则成功通知 |
|
||||
| Info(string) | 显示一则消息通知 |
|
||||
| Info(string, string) | 使用指定的消息标记显示一则消息通知 |
|
||||
| Info(GrowlInfo) | 使用完整的消息初始化模型显示一则消息通知 |
|
||||
| Warning(string) | 显示一则警告通知 |
|
||||
| Warning(string, string) | 使用指定的消息标记显示一则警告通知 |
|
||||
| Warning(GrowlInfo) | 使用完整的消息初始化模型显示一则警告通知 |
|
||||
| Error(string) | 显示一则错误通知 |
|
||||
| Error(string, string) | 使用指定的消息标记显示一则错误通知 |
|
||||
| Error(GrowlInfo) | 使用完整的消息初始化模型显示一则错误通知 |
|
||||
| Fatal(string) | 显示一则严重通知 |
|
||||
| Fatal(string, string) | 使用指定的消息标记显示一则严重通知 |
|
||||
| Fatal(GrowlInfo) | 使用完整的消息初始化模型显示一则严重通知 |
|
||||
| Ask(string, Func<bool, bool>) | 显示一则询问通知 |
|
||||
| Ask(string, Func<bool, bool>, string) | 使用指定的消息标记显示一则询问通知 |
|
||||
| Ask(GrowlInfo) | 使用完整的消息初始化模型显示一则询问通知 |
|
||||
| Register(string, Panel) | 为指定的容器注册消息标记 |
|
||||
| Unregister(string, Panel) | 为指定的容器取消消息标记的注册 |
|
||||
| Unregister(Panel) | 如果该容器注册了消息标记则取消注册 |
|
||||
| Clear( ) | 清空当前使用的消息容器中的消息 |
|
||||
| Clear(string) | 清空含有指定消息标记的消息容器中的消息 |
|
||||
|
||||
## FAQ
|
||||
|
||||
{% note info no-icon %}
|
||||
Ask比较特殊,咋用?
|
||||
{% endnote %}
|
||||
|
||||
Ask方法主要的焦点为第二个参数,它的类型是`Func<bool, bool>`,我们先看示例代码:
|
||||
``` csharp
|
||||
Growl.Ask(Properties.Langs.Lang.GrowlAsk, isConfirmed =>
|
||||
{
|
||||
Growl.Info(isConfirmed.ToString());
|
||||
return true;
|
||||
});
|
||||
```
|
||||
使用Ask方法默认会显示“确认”和“取消”按钮,当点击“确认”时,上述代码中的`isConfirmed`的值为`true`,点击“取消”则为`false`,可以根据`isConfirmed`的值来采取相应操作,最后如果返回`true`则会关闭Growl通知,返回`false`则不关闭。
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
@@ -0,0 +1,88 @@
|
||||
---
|
||||
title: 欢迎使用HandyControl
|
||||
---
|
||||
|
||||
HandyControl是一套WPF控件库,它几乎重写了所有原生样式,同时包含50多款额外的控件(正逐步增加)。
|
||||
|
||||
# 使用要求
|
||||
|
||||
- .Net >= 4.0
|
||||
- OS >= win7
|
||||
- IDE >= vs2017
|
||||
- C# >= 7.0
|
||||
|
||||
# 下载
|
||||
|
||||
## Nuget
|
||||
|
||||
Nuget上是编译好的发布版本,地址为:[HandyControl-Nuget](https://www.nuget.org/packages/HandyControl/)
|
||||
{% note warning %}
|
||||
Nuget上一般至少一个月发布一次,所以有很大的可能和本文档有出入,有出入的地方一切以本文档为准。
|
||||
{% endnote %}
|
||||
|
||||
## Github
|
||||
|
||||
Github上是最新的源代码,地址为:[HandyControl-Github](https://github.com/HandyOrg/HandyControl)
|
||||
{% note warning %}
|
||||
Github上一般每天都有更新,相对而言不适合用于生产。
|
||||
{% endnote %}
|
||||
|
||||
{% note warning %}
|
||||
文档的更新速度必然跟不上最新的Github源码,有出入的地方一切以本文档为准,因为文档是相对稳定的。
|
||||
{% endnote %}
|
||||
|
||||
# 项目结构介绍
|
||||
|
||||
## 整体结构
|
||||
|
||||
从Github上克隆好源码后,进入src文件夹,该文件夹结构如下:
|
||||

|
||||
|
||||
这里一共有三个解决方案sln文件,需要注意的是HandyControl_Core30.sln需要用VS2019打开,其它两个用VS2017即可。
|
||||
|
||||
`Net_GE45`的意思是.Net版本大于等于4.5
|
||||
|
||||
`Shared`文件夹用于存放共享项目的代码
|
||||
|
||||
图中五个文件夹内部各包含两个子文件夹,例如在Shared中还包含两个子文件夹:
|
||||

|
||||
|
||||
它们分别存放控件源码和控件示例源码。
|
||||
|
||||
## 源码结构
|
||||
|
||||
我们以HandyControl_Net_GE45.sln为示例进行说明,使用VS2017打开该解决方案:
|
||||

|
||||
|
||||
如果要启动示例,查看控件效果,请将HandyControlDemo_[指定的项目类型]作为启动项。
|
||||
|
||||
如图,已将HandyControlDemo_Net_GE45作为启动项。
|
||||
|
||||
大部分公共的源码都在Shared文件夹中,部分需要为特定项目类型定制的代码则被提出来放到各自的文件夹中。
|
||||
|
||||
HandyControl源码(主要在HandyControl_Shared中)主要包含7个文件夹,对它们的描述如下表所示:
|
||||
|
||||
| 名称 | 用途 |
|
||||
|-|-|
|
||||
| Controls | 包含所有控件的后台交互逻辑 |
|
||||
| Data | 控件库所需的基本数据定义 |
|
||||
| Expression | 抽取自Microsoft.Expression.Drawing |
|
||||
| Interactivity | 抽取自Microsoft.Expression.Interactions & System.Windows.Interactivity,并做了部分修改 |
|
||||
| Properties | 包含控件库属性和语言包 |
|
||||
| Themes | 包含控件库所有的xaml定义 |
|
||||
| Tools | 主要包含控件库所需的帮助方法和扩展方法 |
|
||||
|
||||
{% note info %}
|
||||
Controls中的每个控件一般都能在Themes中找到对应的xaml定义。
|
||||
{% endnote %}
|
||||
|
||||
# 编译源码
|
||||
|
||||
{% note warning %}
|
||||
编译前请确认你的开发环境是否符合使用要求。
|
||||
{% endnote %}
|
||||
|
||||
{% note info %}
|
||||
HandyControl_Net_GE45.sln解决方案中包含了3个项目类型,分别是.Net 4.5、.Net 4.6.2和.Net 4.7,请在解决方案配置下拉框中进行选择:
|
||||

|
||||
{% endnote %}
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,62 @@
|
||||
---
|
||||
title: Border 边框
|
||||
---
|
||||
|
||||
# BorderRegionStyle
|
||||
|
||||
此样式用于包裹一个控件区域,配合基础xaml定义中的几个DropShadowEffect资源可制作如下效果:
|
||||
|
||||

|
||||
|
||||
以上效果的xaml代码如下:
|
||||
|
||||
``` xml
|
||||
<UniformGrid Margin="32,32,0,0" Columns="3" Rows="2">
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow1}">
|
||||
<Border Background="{DynamicResource InfoBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow2}">
|
||||
<Border Background="{DynamicResource WarningBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow3}">
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow4}">
|
||||
<Border Background="{DynamicResource AccentBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</Border>
|
||||
<Border Style="{StaticResource BorderRegionStyle}" Width="200" Height="200" Margin="0,0,32,32" Effect="{StaticResource EffectShadow5}">
|
||||
<Border Background="{DynamicResource BorderBrush}">
|
||||
<TextBlock Text="{x:Static langs:Lang.ContentDemoStr}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</UniformGrid>
|
||||
```
|
||||
|
||||
# BorderVerticallySplitter
|
||||
|
||||
此样式使用1单位宽度的Border来分割横向排列的控件。
|
||||
|
||||
# BorderHorizontallySplitter
|
||||
|
||||
此样式使用1单位高度的Border来分割纵向排列的控件。
|
||||
|
||||
# BorderCircular
|
||||
|
||||
此样式借助`BorderElement.Circular`附加属性可实现圆形Border。
|
||||
|
||||
# BorderClip
|
||||
|
||||
此样式在`BorderCircular`基础上添加了裁剪功能,常用于显示圆形Image。
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: 建设中
|
||||
---
|
||||
|
||||
建设中
|
||||
Loaded 100 of 445 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user