更新文档

This commit is contained in:
Sunny 2024-09-24 22:08:38 +08:00
parent 2ae270d571
commit ecc1433b37
51 changed files with 866 additions and 50 deletions

View File

@ -49,7 +49,25 @@ export default defineConfig({
collapsed: true,
items: [
{ text: 'UIAvatar', link: '/UIAvatar' },
{ text: 'UILoginForm', link: '/UILoginForm' }
{ text: 'UIBattery', link: '/UIBattery' },
{ text: 'UIBreadcrumb', link: '/UIBreadcrumb' },
{ text: 'UIButton', link: '/UIButton' },
{ text: 'UICheckBox', link: '/UICheckBox' },
{ text: 'UICheckBoxGroup', link: '/UICheckBoxGroup' },
{ text: 'UIGroupBox', link: '/UIGroupBox' },
{ text: 'UILabel', link: '/UILabel' },
{ text: 'UILedDisplay', link: '/UILedDisplay' },
{ text: 'UILedLabel', link: '/UILedLabel' },
{ text: 'UILedStopwatch', link: '/UILedStopwatch' },
{ text: 'UILinkLabel', link: '/UILinkLabel' },
{ text: 'UIMarkLabel', link: '/UIMarkLabel' },
{ text: 'UIPanel', link: '/UIPanel' },
{ text: 'UIRadioButton', link: '/UIRadioButton' },
{ text: 'UIRadioButtonGroup', link: '/UIRadioButtonGroup' },
{ text: 'UISwitch', link: '/UISwitch' },
{ text: 'UISymbolButton', link: '/UISymbolButton' },
{ text: 'UISymbolLabel', link: '/UISymbolLabel' },
{ text: 'UITitlePanel', link: '/UITitlePanel' }
]
},
{

View File

@ -1,3 +1,5 @@
# UIAvatar
---
- **UIAvatar**
头像
@ -24,29 +26,32 @@
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 字体图标
![输入图片说明](https://images.gitee.com/uploads/images/2021/0416/232533_5e3bba9d_416720.png "屏幕截图.png")
设置Symbol属性
![输入图片说明](https://images.gitee.com/uploads/images/2021/0127/213545_4603d7c9_416720.png "11.png")
点击Symbol右侧的按钮
![输入图片说明](https://images.gitee.com/uploads/images/2021/0127/213636_ee4259fe_416720.png "12.png")
[[原创][开源] SunnyUI.Net 字体图标 ](https://www.cnblogs.com/yhuse/p/SunnyUI_FontImage.html)https://www.cnblogs.com/yhuse/p/SunnyUI_FontImage.html<br/>
- 字体图标
![输入图片说明](./assets/232533_5e3bba9d_416720.png)
- 主题风格
**主题** https://gitee.com/yhuse/SunnyUI/wikis/pages?sort_id=3739705&doc_id=1022550<br/>
- Symbol字体图标int
SymbolSize字体图标的大小int
![enter image description here](./assets/164128_b3ef97c6_416720.png)
点击Symbol右侧的按钮
![输入图片说明](./assets/04b7d3ee_416720.png)
鼠标移到图标上显示的数字为Symbol字符点击图标即可设置图标。
- 显示方式
设置Icon属性
显示方式图片Image、字体图标Symbol、文字Text
![输入图片说明](./assets/232638_fd30df5f_416720.png)
- 主题设置
设置Style属性调用系统自带主题如果需要自定义颜色就是更改颜色属性后把控件的Style设置为CustomStyleCustomMode设置为True
StyleCustomMode就是接受用户自定义颜色的意思。
- 显示方式
设置Icon属性
显示方式图片Image、字体图标Symbol、文字Text
![输入图片说明](https://images.gitee.com/uploads/images/2021/0416/232638_fd30df5f_416720.png "屏幕截图.png")
- 显示形状
设置Shape属性
圆形Circle
![输入图片说明](https://images.gitee.com/uploads/images/2021/0416/232755_71dc172b_416720.png "屏幕截图.png")
方形Square
![输入图片说明](https://images.gitee.com/uploads/images/2021/0416/232813_0ae7f901_416720.png "屏幕截图.png")
- 显示形状
设置Shape属性
圆形Circle
![输入图片说明](./assets/232755_71dc172b_416720.png)
方形Square
![输入图片说明](./assets/232813_0ae7f901_416720.png)

37
docs/UIBattery.md Normal file
View File

@ -0,0 +1,37 @@
# UIBattery
---
- **UIBattery**
电池电量图标
- 默认属性Power
- 默认事件:-
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Power | 电量 | int | 100|
| ForeColor | 默认电量颜色 | Color | - |
| MultiColor | 根据电量显示多种颜色| bool| true|
| ColorEmpty| 电量为空颜色 | Color | - |
| ColorDanger|电量少时颜色 | Color | - |
| ColorSafe| 电量安全颜色 | Color | - |
| FillColor | 填充颜色 | Color | - |
| SymbolSize| 图标大小 | int | 45 |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 默认电量颜色
MultiColor设置为false时显示同一色
![输入图片说明](./assets/092842_9c0a202e_416720.png)
- 多种电量颜色
MultiColor设置为true时根据电量显示多种颜色
![输入图片说明](./assets/093235_dd7f180f_416720.png)
依次为:电量为空颜色,电量少时颜色,电量安全颜色,电量安全颜色,电量安全颜色

27
docs/UIBreadcrumb.md Normal file
View File

@ -0,0 +1,27 @@
# UIBreadcrumb
---
- **UIBreadcrumb**
面包屑导航条。
- 默认属性ItemIndex
- 默认事件ItemIndexChanged
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Items |列表项 | ObjectCollection | - |
| ItemIndex |当前节点索引 | int|0 |
| ItemWidth|当前节点宽度索引 | int|120 |
| Interval|节点间隔 | int|1|
| ForeColor | 字体颜色 | Color | - |
| SelectedColor| 已选节点颜色 | Color | - |
| UnSelectedColor| 未选节点颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 示例
![输入图片说明](./assets/134446_6fedb531_416720.png)

49
docs/UIButton.md Normal file
View File

@ -0,0 +1,49 @@
# UIButton
---
- **UIButton**
常用的操作按钮。
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| Selected | 是否选中 | bool | false |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| FillHoverColor | 鼠标移上时填充颜色 | Color | - |
| RectHoverColor | 鼠标移上时边框颜色 | Color | - |
| ForeHoverColor | 鼠标移上时字体颜色 | Color | - |
| FillPressColor | 鼠标按下时填充颜色 | Color | - |
| RectPressColor | 鼠标按下时边框颜色 | Color | - |
| ForePressColor | 鼠标按下时字体颜色 | Color | - |
| FillSelectedColor | 选中时填充颜色 | Color | - |
| ForeSelectedColor | 选中时字体颜色 | Color | - |
| RectSelectedColor | 选中时边框颜色 | Color | - |
| DialogResult | 指定标识符以指示对话框的返回值 | DialogResult | None |
| ShowFocusLine | 显示激活时边框线 | bool | false |
| ShowTips | 是否显示角标 | bool | false |
| TipsText | 角标文字 | string | - |
| TipsFont | 角标文字字体 | Font | - |
| TipsColor | 角标文字颜色 | Color | Red |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
| UseDoubleClick | 是否启用双击事件 | bool |false |
- 圆角按钮
![输入图片说明](./assets/b78a4d3d_416720.png)
设置Radius和高度一样例如Size:100,35 Radius:35

40
docs/UICheckBox.md Normal file
View File

@ -0,0 +1,40 @@
# UICheckBox
---
- **UICheckBox**
复选框。
- 默认属性Checked
- 默认事件CheckedChanged
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Checked|是否选中 | bool| false|
| Text |获取或设置显示的文本 | string | - |
| AutoSize|自动大小 | bool| true |
| ImageSize|图标大小 | int| 16 |
| ImageInterval|图标与文字之间间隔| int| 3 |
| ReadOnly|是否只读| bool| false |
| ForeColor | 字体颜色 | Color | - |
| CheckBoxColor| 填充颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 事件
CheckedChanged
public event EventHandler CheckedChanged;
参数sender当前控件
ValueChanged
public delegate void OnValueChanged(object sender, bool value);
参数sender当前控件
参数value选中值Checked
- 示例
![输入图片说明](./assets/142324_0224b4ba_416720.png)

67
docs/UICheckBoxGroup.md Normal file
View File

@ -0,0 +1,67 @@
# UICheckBoxGroup
---
- **UICheckBoxGroup**
多选框组。
- 默认属性Items
- 默认事件ValueChanged
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Items |获取该多选框组中项的集合| ObjectCollection | - |
| Text |获取或设置显示的文本 | string | - |
| ColumnCount | 显示列的个数 | int | 1 |
| ColumnInterval | 显示项列之间的间隔 | int | 0 |
| RowInterval | 显示项行之间的间隔 | int | 0 |
| ItemSize | 显示项的大小 | Size | 150, 30 |
| StartPos | 显示项的起始位置 | Point | 12, 12 |
| TitleTop | 标题高度 | int | 16 |
| TitleInterval | 标题显示间隔| int | 10 |
| TitleAlignment | 文字显示位置| HorizontalAlignment | Left |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 事件
ValueChanged
public delegate void OnValueChanged(object sender, int index, string text, bool isChecked);
参数sender当前控件
参数index选中索引SelectedIndex
参数text选中项的文本
参数isChecked选中项是否选中
- 增加编辑项
选择控件属性Items点击打开在其中增加编辑项
- 多列显示
设置ColumnCount=2显示两列
![输入图片说明](./assets/153157_f15c5d08_416720.png)
- 函数方法
全选: SelectAll();
全不选: UnSelectAll() ;
反选: ReverseSelected();
清空: Clear();
选中索引列表SelectedIndexes
选中项列表SelectedItems

View File

@ -42,38 +42,39 @@
| Version | 版本 | string | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
- 主题风格
[主题](/theme)
- 主题设置
设置Style属性调用系统自带主题如果需要自定义颜色就是更改颜色属性后把控件的Style设置为CustomStyleCustomMode设置为True
StyleCustomMode就是接受用户自定义颜色的意思。
- 创建窗体
项目引用SunnyUI.dll和SunnyUI.Common.dll或者从Nuget引用SunnyUI。
详见[安装](/install)
项目引用SunnyUI.dll和SunnyUI.Common.dll或者从Nuget引用SunnyUI。
详见[安装](/install)
- 新建窗体:
![输入图片说明](./assets/225716_b52454e1_416720.png)
修改把Form修改成UIForm并且 using Sunny.UI;
![输入图片说明](./assets/225813_5afb8ba9_416720.png)
这时切换到窗体窗体已经变为UIForm
![输入图片说明](./assets/28063ee9_416720.png)
**下一步的操作非常重要:**
把窗体的AutoScaleMode从Font设置为None否则可能出现因为屏幕分辨率而导致的窗体变形。
![输入图片说明](./assets/230113_bf629fd4_416720.png)
- 拖拽调整窗体大小
ShowDragStretch 设置为true显示边框可拖拽调整窗体大小。
ShowDragStretch 设置为true显示边框可拖拽调整窗体大小。
- 显示任务栏图标
设置Icon将ShowIcon设置为true再打开ShowTitleIcon可显示窗体标题栏图标。
- 显示标题栏扩展按钮
- 显示标题栏扩展按钮
ExtendBox设置为true可在标题栏现有按钮最小化按钮的左边显示一个扩展按钮。
扩展按钮的图标设置ExtendSymbol。ExtendMenu为扩展按钮点击的下拉菜单。

34
docs/UIGroupBox.md Normal file
View File

@ -0,0 +1,34 @@
# UIGroupBox
---
- **UIGroupBox**
组框。
- 默认属性Text
- 默认事件:
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| TitleTop | 标题高度 | int | 16 |
| TitleInterval | 标题显示间隔| int | 10 |
| TitleAlignment | 文字显示位置| HorizontalAlignment | Left |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 示例
![输入图片说明](./assets/150025_5481ef83_416720.png)

22
docs/UILabel.md Normal file
View File

@ -0,0 +1,22 @@
# UILabel
---
- **UILabel**
标签。
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| ForeColor | 字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 示例
![输入图片说明](./assets/220321_fa55106f_416720.png)

35
docs/UILedDisplay.md Normal file
View File

@ -0,0 +1,35 @@
# UILedDisplay
---
- **UILedDisplay** LED显示屏。
**注:仅支持英文、数字、标点符号、希腊字母,不支持中文**
- 默认属性Text
- 默认事件:-
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Text |获取或设置显示的文本 | string | - |
| CharCount| 显示字符个数 | int | 10 |
| BorderColor | 边框颜色 | Color | - |
| BorderInColor | 内线颜色 | Color | - |
| LedBackColor | LED背景色 | Color | - |
| BorderWidth| 边框宽度 | int | 1 |
| BorderInWidth| 内线宽度 | int | 1 |
| IntervalIn | LED亮块间距 | int | 1 |
| IntervalOn | LED亮块大小 | int | 2 |
| IntervalH | 左右边距 | int | 2 |
| IntervalV | 上下边距 | int | 5 |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 控件宽度
因为本控件模拟的时一个LED点阵显示屏LED点阵显示屏宽度由可显示字符个数决定。
所以需要调整控件的宽度不是设置Width属性而是设置CharCount属性。
- 示例
![输入图片说明](./assets/094934_cd27df88_416720.png)

25
docs/UILedLabel.md Normal file
View File

@ -0,0 +1,25 @@
# UILedLabel
---
- **UILedLabel** LED标签。
**注:仅支持英文、数字、标点符号、希腊字母,不支持中文**
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| BackColor | 背景颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| IntervalIn | LED亮块间距 | int | 1 |
| IntervalOn | LED亮块大小 | int | 2 |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 示例
![输入图片说明](./assets/215716_1239d541_416720.png)

44
docs/UILedStopwatch.md Normal file
View File

@ -0,0 +1,44 @@
# UILedStopwatch
---
- **UILedStopwatch**
LED计时器。
- 默认属性Text
- 默认事件TimerTick
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Text |获取或设置显示的文本 | string | - |
| CharCount| 显示字符个数 | int | 10 |
| ShowType| 显示方式 | TimeShowType| -|
| Active| 是否开始工作 | bool| false |
| BorderColor | 边框颜色 | Color | - |
| BorderInColor | 内线颜色 | Color | - |
| LedBackColor | LED背景色 | Color | - |
| BorderWidth| 边框宽度 | int | 1 |
| BorderInWidth| 内线宽度 | int | 1 |
| IntervalIn | LED亮块间距 | int | 1 |
| IntervalOn | LED亮块大小 | int | 2 |
| IntervalH | 左右边距 | int | 2 |
| IntervalV | 上下边距 | int | 5 |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
| TimeSpan| 开始计时后用去的时间| TimeSpan| - |
| IsWorking| 是否开始工作| bool| false |
- 控件宽度
因为本控件模拟的时一个LED点阵显示屏LED点阵显示屏宽度由可显示字符个数决定。
所以需要调整控件的宽度不是设置Width属性而是设置CharCount属性。
- 事件
TimerTick当定时器启动后Text变化时触发一次
- 示例
![输入图片说明](./assets/100744_1b3a73c1_416720.png)

25
docs/UILinkLabel.md Normal file
View File

@ -0,0 +1,25 @@
# UILinkLabel
---
- **UILinkLabel**
表示可显示超链接的标签控件。
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| ForeColor | 字体颜色 | Color | - |
| ActiveLinkColor | 获取或设置用来显示活动链接的颜色。 | Color | - |
| LinkColor | 获取或设置显示普通链接时使用的颜色。 | Color | - |
| VisitedLinkColor | 获取或设置当显示以前访问过的链接时所使用的颜色。 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 示例
![输入图片说明](./assets/220423_22aa1962_416720.png)

View File

@ -20,39 +20,40 @@
| Version | 版本 | string | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
- 事件
ButtonLoginClick确定按钮点击事件有此事件时不执行OnLogin。需要手动给IsLogin赋值。
ButtonCancelClick取消按钮点击事件。
OnLogin登录事件。ButtonLoginClick为空时才执行此时间返回值为IsLogin。
- 主题风格
[主题](/theme)
- 主题设置
设置Style属性调用系统自带主题如果需要自定义颜色就是更改颜色属性后把控件的Style设置为CustomStyleCustomMode设置为True
StyleCustomMode就是接受用户自定义颜色的意思。
- 创建窗体
项目引用SunnyUI.dll和SunnyUI.Common.dll或者从Nuget引用SunnyUI。
详见[安装](/install)
- 创建窗体
项目引用SunnyUI.dll和SunnyUI.Common.dll或者从Nuget引用SunnyUI。详见[安装](/install)
创建窗体:参考[UIForm](/UIForm)创建窗体
切记把窗体的AutoScaleMode从Font设置为None否则可能出现因为屏幕分辨率而导致的窗体变形。
- 为什么继承的窗体,上面有小锁,能解开吗,还有就是继承的窗体,有些控件属性都设置不了,怎么办?
首先得了解窗体继承的概念和类的继承是差不多的窗体上有小锁的其实就是类似于类继承中父类的某个Private属性
为了保证继承窗体的UI设计上面的某些控件是不让修改和移动的所以有锁。
在使用时,父窗体一般都将其所用的控件的属性和事件进行了封装,可以正常使用。
举例:
![输入图片说明](./assets/011a9a81_416720.png)
- 继承的登录窗体的登录按钮有锁,但其点击事件已封装到父类的事件。
需要选中窗体,查看其事件:
![输入图片说明](./assets/105850_f7800c4b_416720.png)
- 通过代码创建
也可以不用创建窗体,直接通过代码创建,来实现登录过程
```c#
UILoginForm frm = new UILoginForm();
frm.ShowInTaskbar = true;

27
docs/UIMarkLabel.md Normal file
View File

@ -0,0 +1,27 @@
# UIMarkLabel
---
- **UIMarkLabel**
带颜色标签。
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| AutoSize| 自动大小 | bool | true |
| ForeColor | 字体颜色 | Color | - |
| MarkSize | 标签大小 | int | 3 |
| MarkPos | 标签位置 | UIMarkPos | Left |
| MarkColor | 标签颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 标签位置
标签有四个显示位置,左、右、下、上,见下图:
![输入图片说明](./assets/214220_cbd9f247_416720.png)

32
docs/UIPanel.md Normal file
View File

@ -0,0 +1,32 @@
# UIPanel
---
- **UIPanel**
面板。
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| TextAlignment |文字对齐方向 | ContentAlignment | MiddleCenter |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 示例
![输入图片说明](./assets/144220_8ad058b3_416720.png)

47
docs/UIRadioButton.md Normal file
View File

@ -0,0 +1,47 @@
# UIRadioButton
---
- **UIRadioButton**
单选框。
- 默认属性Checked
- 默认事件CheckedChanged
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Checked|是否选中 | bool| false|
| Text |获取或设置显示的文本 | string | - |
| GroupIndex|分组编号 | int| 0 |
| AutoSize|自动大小 | bool| true |
| ImageSize|图标大小 | int| 16 |
| ImageInterval|图标与文字之间间隔| int| 3 |
| ReadOnly|是否只读| bool| false |
| ForeColor | 字体颜色 | Color | - |
| RadioButtonColor| 填充颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 事件
CheckedChanged
public event EventHandler CheckedChanged;
参数sender当前控件
ValueChanged
public delegate void OnValueChanged(object sender, bool value);
参数sender当前控件
参数value选中值Checked
- 分组编号
在同一个容器中多个UIRadioButton可以根据GroupIndex进行分组同一个GroupIndex的只能选中一个
![输入图片说明](./assets/142906_320a5458_416720.png)
- 示例
![输入图片说明](./assets/142752_85484bd2_416720.png)

View File

@ -0,0 +1,63 @@
# UIRadioButtonGroup
---
- **UIRadioButtonGroup**
单选框组。
- 默认属性Items
- 默认事件ValueChanged
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Items |获取该多选框组中项的集合| ObjectCollection | - |
| Text |获取或设置显示的文本 | string | - |
| SelectedIndex | 选中索引 | int | -1 |
| ColumnCount | 显示列的个数 | int | 1 |
| ColumnInterval | 显示项列之间的间隔 | int | 0 |
| RowInterval | 显示项行之间的间隔 | int | 0 |
| ItemSize | 显示项的大小 | Size | 150, 30 |
| StartPos | 显示项的起始位置 | Point | 12, 12 |
| TitleTop | 标题高度 | int | 16 |
| TitleInterval | 标题显示间隔| int | 10 |
| TitleAlignment | 文字显示位置| HorizontalAlignment | Left |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 事件
ValueChanged
public delegate void OnValueChanged(object sender, int index, string text);
参数sender当前控件
参数index选中索引SelectedIndex
参数text选中项的文本
- 增加编辑项
选择控件属性Items点击打开在其中增加编辑项
- 多列显示
设置ColumnCount=3显示两列
![输入图片说明](./assets/154242_cb2fc9c4_416720.png)
- 函数方法
全不选: SelectedNone() ;
设置选择项: SelectedIndex = 6;
清空: Clear();

42
docs/UISwitch.md Normal file
View File

@ -0,0 +1,42 @@
# UISwitch
---
- **UISwitch** 开关。
- 默认属性Active
- 默认事件ValueChanged
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Active| 是否打开 | bool | false |
| ActiveText| 打开文字 | string| 开 |
| InActiveText| 关闭文字 | string| 关 |
| ActiveColor| 打开颜色 | Color| - |
| InActiveColor| 关闭颜色 | Color| Silver |
| ButtonColor| 填充颜色 | Color| White |
| SwitchShape| 开关形状 | UISwitchShape| Round |
| ForeColor | 字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 事件
ValueChanged
public delegate void OnValueChanged(object sender, bool value);
参数sender当前控件
参数value选中值active
- 开关状态
![输入图片说明](./assets/233007_095707ff_416720.png)
设置Active属性状态切换通过ValueChanged输出
- 开关形状
SwitchShapeRound为圆角开关Square为方角开关

92
docs/UISymbolButton.md Normal file
View File

@ -0,0 +1,92 @@
# UISymbolButton
---
- **UISymbolButton**
字体图标按钮
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| Symbol| 字体图标 | int | 61452 |
| SymbolSize| 字体图标大小 | int | 24 |
| Image| 图片| Image| - |
| ImageAlign| 图片放置位置 | ContentAlignment| MiddleCenter |
| ImageInterval| 图片文字间间隔 | int | 2|
| IsCircle| 是否是圆形 | bool | false |
| CircleRectWidth| 圆形边框大小 | int | 1|
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| Selected | 是否选中 | bool | false |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| FillHoverColor | 鼠标移上时填充颜色 | Color | - |
| RectHoverColor | 鼠标移上时边框颜色 | Color | - |
| ForeHoverColor | 鼠标移上时字体颜色 | Color | - |
| FillPressColor | 鼠标按下时填充颜色 | Color | - |
| RectPressColor | 鼠标按下时边框颜色 | Color | - |
| ForePressColor | 鼠标按下时字体颜色 | Color | - |
| FillSelectedColor | 选中时填充颜色 | Color | - |
| ForeSelectedColor | 选中时字体颜色 | Color | - |
| RectSelectedColor | 选中时边框颜色 | Color | - |
| DialogResult | 指定标识符以指示对话框的返回值 | DialogResult | None |
| ShowFocusLine | 显示激活时边框线 | bool | false |
| ShowTips | 是否显示角标 | bool | false |
| TipsText | 角标文字 | string | - |
| TipsFont | 角标文字字体 | Font | - |
| TipsColor | 角标文字颜色 | Color | Red |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
| UseDoubleClick | 是否启用双击事件 | bool |false |
- 字体图标
![输入图片说明](./assets/b89a75e6_416720.png)
- Symbol字体图标int
SymbolSize字体图标的大小int
![enter image description here](./assets/164128_b3ef97c6_416720.png)
点击Symbol右侧的按钮
![输入图片说明](./assets/04b7d3ee_416720.png)
鼠标移到图标上显示的数字为Symbol字符点击图标即可设置图标。
- 圆形按钮
![输入图片说明](./assets/213244_e2fcb212_416720.png)
设置IsCircle为true可设置CircleRectWidth边框大小
- 按钮组
![输入图片说明](./assets/213728_8aa2cb69_416720.png)
设置左侧按钮显示左边两个圆角(RadiusSides:LeftTop, LeftBottom)
设置中间的按钮(RadiusSides:None)
设置右侧按钮显示左边两个圆角(RadiusSides:RightTop, RightBottom)
- 自定义图片
![输入图片说明](./assets/214035_21305f5f_416720.png)
设置Image属性
- 字体图标不居中显示
因为字体图标不是等宽和等高的,会存在不居中的现象
设置ImageAlign:TopLeft然后设置Padding的Left和Top属性例如5,5,0,0

39
docs/UISymbolLabel.md Normal file
View File

@ -0,0 +1,39 @@
# UISymbolLabel
---
- **UISymbolLabel**
字体图标标签
- 默认属性Text
- 默认事件Click
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| AutoSize| 自动大小 | bool | true |
| Symbol| 字体图标 | int | 61452 |
| SymbolColor | 图标颜色 | Color | - |
| SymbolSize| 字体图标大小 | int | 24 |
| ImageInterval| 图标和文字间间隔 | int | 2|
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| ForeColor | 字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 字体图标
![输入图片说明](./assets/212642_04b86c8c_416720.png)
- Symbol字体图标int
SymbolSize字体图标的大小int
![enter image description here](./assets/164128_b3ef97c6_416720.png)
点击Symbol右侧的按钮
![输入图片说明](./assets/04b7d3ee_416720.png)
鼠标移到图标上显示的数字为Symbol字符点击图标即可设置图标。

44
docs/UITitlePanel.md Normal file
View File

@ -0,0 +1,44 @@
# UITitlePanel
---
- **UITitlePanel**
带标题面板。
- 默认属性Text
- 默认事件:
- 属性列表
| 属性 | 说明 | 类型 | 默认值 |
|-----------|--------|--------|-------|
| Style | 主题样式 | UIStyle | Blue |
| StyleCustomMode | 获取或设置可以自定义主题风格 | bool | false |
| Text |获取或设置显示的文本 | string | - |
| ShowCollapse | 是否打开缩放按钮 | bool | false |
| Collapsed | 是否缩放 | bool | false |
| TitleHeight | 面板高度 | int | 35 |
| TitleInterval |标题文字局左或者局右时与边框距离| int | 10 |
| TitleAlign | 文字显示位置| HorizontalAlignment | Center |
| RadiusSides | 圆角显示位置 | UICornerRadiusSides | All |
| Radius | 圆角角度 | int | 5 |
| RectSides | 边框显示位置 | ToolStripStatusLabelBorderSides | All |
| TextAlign | 文字对齐方向 | ContentAlignment | MiddleCenter |
| TitleColor | 标题颜色 | Color | - |
| FillColor | 填充颜色 | Color | - |
| RectColor | 边框颜色 | Color | - |
| ForeColor | 字体颜色 | Color | - |
| FillDisableColor | 不可用时填充颜色 | Color | - |
| RectDisableColor | 不可用时边框颜色 | Color | - |
| ForeDisableColor | 不可用时字体颜色 | Color | - |
| TagString | 获取或设置包含有关控件的数据的对象字符串 | string | - |
| Version | 版本 | string | - |
- 其他
**标题栏高度内不可放置其他控件。**
如果其中放入其他控件并设置Dock为Fill时遮挡标题栏可设置Padding.Top属性
- 示例
![输入图片说明](./assets/151625_77c07059_416720.png)

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 871 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 757 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1019 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 782 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 967 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB