update doc
This commit is contained in:
1 parent
ebde0bd42b
commit
790d95cf84
20 files changed
+372
-42
No files matched your search
@@ -16,6 +16,7 @@ HandyControl中自带了一些几何形状定义,但要应用于生产中显
|
||||
| LeftGeometry | 左 |
|
||||
| RightGeometry | 右 |
|
||||
| RotateLeftGeometry | 向左旋转 |
|
||||
| RotateRightGeometry | 向左旋转 |
|
||||
| EnlargeGeometry | 放大 |
|
||||
| ReduceGeometry | 缩小 |
|
||||
| DownloadGeometry | 下载 |
|
||||
@@ -28,6 +29,12 @@ HandyControl中自带了一些几何形状定义,但要应用于生产中显
|
||||
| WindowMinGeometry | 窗口最小化 |
|
||||
| WindowRestoreGeometry | 窗口还原 |
|
||||
| WindowMaxGeometry | 窗口最大化 |
|
||||
| CheckedGeometry | 选中 |
|
||||
| PageModeGeometry | 单页模式 |
|
||||
| TwoPageModeGeometry | 双页模式 |
|
||||
| ScrollModeGeometry | 滚动模式 |
|
||||
| EyeOpenGeometry | 睁眼 |
|
||||
| EyeCloseGeometry | 闭眼 |
|
||||
| AudioGeometry | 声音 |
|
||||
| BubbleTailGeometry | 气泡的尾巴 |
|
||||
| StarGeometry | 爱心 |
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
title: Frame 导航框架
|
||||
---
|
||||
|
||||
# FrameBaseStyle
|
||||
|
||||
导航框架默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
案例:
|
||||
|
||||
``` xml
|
||||
<Frame Margin="32" Width="500" Height="360" Name="FrameDemo" NavigationUIVisibility="Visible"/>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
@@ -1,5 +1,37 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: TextBlock 文本块
|
||||
---
|
||||
|
||||
建设中
|
||||
# TextBlockBaseStyle
|
||||
|
||||
文本块默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# TextBlockBoldBaseStyle
|
||||
|
||||
文本块粗体默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# 案例
|
||||
|
||||
```xml
|
||||
<StackPanel>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockLargeBold" Style="{StaticResource TextBlockLargeBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockLarge" Style="{StaticResource TextBlockLarge}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockHeaderBold" Style="{StaticResource TextBlockTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockHeader" Style="{StaticResource TextBlockTitle}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockSubHeaderBold" Style="{StaticResource TextBlockSubTitleBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockSubHeader" Style="{StaticResource TextBlockSubTitle}"/>
|
||||
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultBold" Style="{StaticResource TextBlockDefaultBold}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefault" Style="{StaticResource TextBlockDefault}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultAccent" Style="{StaticResource TextBlockDefaultAccent}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSecLight" Style="{StaticResource TextBlockDefaultSecLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultThiLight" Style="{StaticResource TextBlockDefaultThiLight}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultPrimary" Style="{StaticResource TextBlockDefaultPrimary}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultDanger" Style="{StaticResource TextBlockDefaultDanger}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultWarning" Style="{StaticResource TextBlockDefaultWarning}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultInfo" Style="{StaticResource TextBlockDefaultInfo}"/>
|
||||
<TextBlock HorizontalAlignment="Left" Margin="5" Text="TextBlockDefaultSuccess" Style="{StaticResource TextBlockDefaultSuccess}"/>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||

|
||||
@@ -1,5 +1,40 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: TextBox 文本框
|
||||
---
|
||||
|
||||
建设中
|
||||
# TextBoxBaseStyle
|
||||
|
||||
原生文本框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
- 默认样式
|
||||
`<TextBox Width="200" VerticalAlignment="Center"/>`
|
||||

|
||||
|
||||
# TextBoxExtendBaseStyle : TextBoxBaseStyle
|
||||
|
||||
原生文本框扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# TextBoxExtend : TextBoxExtendBaseStyle
|
||||
|
||||
相对于原生文本框默认样式,它借助于附加属性可以实现标题、水印的功能。
|
||||
|
||||
- 标题在上
|
||||
`<TextBox Style="{StaticResource TextBoxExtend}" hc:InfoElement.Title="这是标题" Width="200" VerticalAlignment="Center"/>`
|
||||

|
||||
|
||||
- 标题在左
|
||||
`<TextBox Style="{StaticResource TextBoxExtend}" hc:InfoElement.TitleAlignment="Left" hc:InfoElement.Title="这是标题" Width="300" VerticalAlignment="Center"/>`
|
||||

|
||||
|
||||
{% note warning %}
|
||||
标题在左时,为了多个输入框左侧对齐,需要设置标题宽度,标题宽度无需逐个设置,可在外部容器上统一设置。
|
||||
{% endnote %}
|
||||
|
||||
- 标题在上,带有水印
|
||||
[参见Combobox](https://handyorg.github.io/handycontrol/native_controls/comboBox/)
|
||||
|
||||
- 标题在上,带有水印,且为必填
|
||||
[参见Combobox](https://handyorg.github.io/handycontrol/native_controls/comboBox/)
|
||||
|
||||
- 标题在上,带有水印,且为必填,同时自定义必填提示符
|
||||
[参见Combobox](https://handyorg.github.io/handycontrol/native_controls/comboBox/)
|
||||
@@ -1,5 +1,177 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ToggleButton 切换按钮
|
||||
---
|
||||
|
||||
建设中
|
||||
# ToggleButtonBaseStyle : ButtonBaseBaseStyle
|
||||
|
||||
切换按钮默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info %}
|
||||
所有继承此样式的按钮都可以使用`IconElement`中定义的附加属性来控制按钮中几何图形的属性。
|
||||
{% endnote %}
|
||||
|
||||
{% note info %}
|
||||
所有继承此样式的按钮都可以使用`BorderElement.CornerRadius`附加属性来控制按钮的圆角大小。
|
||||
{% endnote %}
|
||||
|
||||
## 相关样式
|
||||
|
||||
| 名称 | 继承自 | 用途描述 |
|
||||
| - | - | - |
|
||||
| ToggleButtonPrimary | ToggleButtonBaseStyle | 主要 |
|
||||
| ToggleButtonSuccess | ToggleButtonBaseStyle | 成功 |
|
||||
| ToggleButtonInfo | ToggleButtonBaseStyle | 信息 |
|
||||
| ToggleButtonWarning | ToggleButtonBaseStyle | 警告 |
|
||||
| ToggleButtonDanger | ToggleButtonBaseStyle | 危险 |
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<ToggleButton MinWidth="100" Content="Default"/>
|
||||
<ToggleButton MinWidth="100" Content="Primary" Margin="0,6,0,0" Style="{StaticResource ToggleButtonPrimary}"/>
|
||||
<ToggleButton MinWidth="100" Content="Success" Margin="0,6,0,0" Style="{StaticResource ToggleButtonSuccess}"/>
|
||||
<ToggleButton MinWidth="100" Content="Info" Margin="0,6,0,0" Style="{StaticResource ToggleButtonInfo}"/>
|
||||
<ToggleButton MinWidth="100" Content="Warning" Margin="0,6,0,0" Style="{StaticResource ToggleButtonWarning}"/>
|
||||
<ToggleButton MinWidth="100" Content="Danger" Margin="0,6,0,0" Style="{StaticResource ToggleButtonDanger}"/>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
|
||||
# ToggleButtonIconBaseStyle : BaseStyle
|
||||
|
||||
只显示图标的切换按钮,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info %}
|
||||
所有继承此样式的按钮都可以使用`IconElement`中定义的附加属性来控制按钮中几何图形的属性。
|
||||
{% endnote %}
|
||||
|
||||
{% note info %}
|
||||
所有继承此样式的按钮都可以使用`BorderElement.CornerRadius`附加属性来控制按钮的圆角大小。
|
||||
{% endnote %}
|
||||
|
||||
## 相关样式
|
||||
|
||||
| 名称 | 继承自 | 用途描述 |
|
||||
| - | - | - |
|
||||
| ToggleButtonIcon | ToggleButtonIconBaseStyle | 默认 |
|
||||
| ToggleButtonIconPrimary | ToggleButtonIconBaseStyle | 主要 |
|
||||
| ToggleButtonIconSuccess | ToggleButtonIconBaseStyle | 成功 |
|
||||
| ToggleButtonIconInfo | ToggleButtonIconBaseStyle | 信息 |
|
||||
| ToggleButtonIconWarning | ToggleButtonIconBaseStyle | 警告 |
|
||||
| ToggleButtonIconDanger | ToggleButtonIconBaseStyle | 危险 |
|
||||
| ToggleButtonIconTransparent | ToggleButtonIconBaseStyle | 透明 |
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<ToggleButton Padding="6" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIcon}"/>
|
||||
<ToggleButton Margin="6,0,0,0" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIconPrimary}"/>
|
||||
<ToggleButton Margin="6,0,0,0" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIconSuccess}"/>
|
||||
<ToggleButton Margin="6,0,0,0" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIconInfo}"/>
|
||||
<ToggleButton Margin="6,0,0,0" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIconWarning}"/>
|
||||
<ToggleButton Margin="6,0,0,0" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIconDanger}"/>
|
||||
<ToggleButton Margin="6,0,0,0" hc:IconElement.Geometry="{StaticResource ClockGeometry}" Style="{StaticResource ToggleButtonIconTransparent}"/>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
|
||||
# ToggleButtonSwitchBaseStyle : BaseStyle
|
||||
|
||||
开关式切换按钮,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
## 相关样式
|
||||
|
||||
| 名称 | 继承自 |
|
||||
| - | - | - |
|
||||
| ToggleButtonSwitch | ToggleButtonSwitchBaseStyle |
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<ToggleButton Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
<ToggleButton Margin="0,6,0,0" IsChecked="True" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
|
||||
# ToggleButtonFlip : BaseStyle
|
||||
|
||||
翻转式切换按钮。
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<ToggleButton BorderThickness="0" IsChecked="True" Style="{StaticResource ToggleButtonFlip}">
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="关" Foreground="{DynamicResource TextIconBrush}"/>
|
||||
</Border>
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="开" Foreground="{DynamicResource TextIconBrush}"/>
|
||||
</Border>
|
||||
</ToggleButton>
|
||||
<ToggleButton Margin="0,6,0,0" BorderThickness="0" IsChecked="False" Style="{StaticResource ToggleButtonFlip}">
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="关" Foreground="{DynamicResource TextIconBrush}"/>
|
||||
</Border>
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Background="{DynamicResource DangerBrush}">
|
||||
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="开" Foreground="{DynamicResource TextIconBrush}"/>
|
||||
</Border>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
|
||||
# ToggleButtonCustom : BaseStyle
|
||||
|
||||
如果想完全自定义按钮的内容,则推荐使用此样式。`ToggleButtonCustom`中的内容完全由你自己决定。
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<ToggleButton IsChecked="True" Style="{StaticResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True">
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</ToggleButton>
|
||||
<ToggleButton Margin="0,6,0,0" IsChecked="False" Style="{StaticResource ToggleButtonCustom}" hc:StatusSwitchElement.HideUncheckedElement="True">
|
||||
<hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource PrimaryBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</hc:StatusSwitchElement.CheckedElement>
|
||||
<Border Width="80" Height="30" CornerRadius="4" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<Ellipse Width="20" Height="20" Fill="{DynamicResource BorderBrush}" StrokeThickness="1" Stroke="{DynamicResource BorderBrush}"/>
|
||||
</Border>
|
||||
</ToggleButton>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
@@ -1,5 +1,21 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ToolBar 工具条
|
||||
---
|
||||
|
||||
建设中
|
||||
# ToolBarBaseStyle
|
||||
|
||||
工具条默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<ToolBar Padding="10,6" Header="Demo" VerticalAlignment="Center" HorizontalAlignment="Center">
|
||||
<Button Content="Demo" Margin="10,0,0,0"/>
|
||||
<ToggleButton Content="Demo" Margin="10,0,0,0"/>
|
||||
<CheckBox Content="Demo" Margin="10,0,0,0"/>
|
||||
</ToolBar>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
@@ -1,5 +1,7 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ToolTip 工具提示
|
||||
---
|
||||
|
||||
建设中
|
||||
# ToolTipBaseStyle
|
||||
|
||||
工具提示默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
@@ -1,5 +1,35 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: TreeView 树视图
|
||||
---
|
||||
|
||||
建设中
|
||||
# TreeViewBaseStyle : BaseStyle
|
||||
|
||||
树视图默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
案例:
|
||||
|
||||
```xml
|
||||
<TreeView Width="200" VerticalAlignment="Center">
|
||||
<TreeViewItem Header="111">
|
||||
<TreeViewItem Header="111"/>
|
||||
<TreeViewItem Header="222"/>
|
||||
<TreeViewItem Header="333"/>
|
||||
</TreeViewItem>
|
||||
<TreeViewItem Header="222">
|
||||
<TreeViewItem Header="111"/>
|
||||
<TreeViewItem Header="222"/>
|
||||
<TreeViewItem Header="333"/>
|
||||
</TreeViewItem>
|
||||
</TreeView>
|
||||
```
|
||||
|
||||
效果:
|
||||
|
||||

|
||||
|
||||
# 相关样式
|
||||
|
||||
| 名称 | 继承自 | 用途描述 |
|
||||
| - | - | - |
|
||||
| TreeViewItemBaseStyle | BaseStyle | 树视图项默认样式 |
|
||||
| ExpandCollapseToggleStyle | | 树视图折叠按钮样式 |
|
||||
@@ -1,5 +1,13 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: Window 窗口
|
||||
---
|
||||
|
||||
建设中
|
||||
`wpf`中窗口不会自动应用隐式样式,`hc`中提供了相关方法用以解决这个问题。
|
||||
|
||||
# Window 窗口
|
||||
|
||||
可通过 `ConfigHelper.Instance.SetWindowDefaultStyle()` 来设置窗口的默认样式。
|
||||
|
||||
# NavigationWindow 导航窗口
|
||||
|
||||
可通过 `ConfigHelper.Instance.SetNavigationWindowDefaultStyle()` 来设置导航窗口的默认样式。
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
title: handykeras
|
||||
date: 2019-04-02 00:03:48
|
||||
---
|
||||
Reference in new issue
Block a user