Skip to content

Commit 625aeba

Browse files
committed
update docs
1 parent 685bb07 commit 625aeba

6 files changed

Lines changed: 289 additions & 12 deletions

File tree

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
---
2-
title: 建设中
2+
title: Transfer 穿梭框
33
---
44

5-
建设中
5+
穿梭选择框用直观的方式在两栏中移动元素,完成选择行为。
6+
7+
```cs
8+
[DefaultProperty("Items")]
9+
[ContentProperty("Items")]
10+
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
11+
public class SimpleItemsControl : Control
12+
```
13+
14+
```cs
15+
[TemplatePart(Name = ElementItemsOrigin, Type = typeof(SimpleItemsControl))]
16+
[TemplatePart(Name = ElementItemsSelected, Type = typeof(SimpleItemsControl))]
17+
public class Transfer : SimpleItemsControl
18+
```
19+
20+
# 属性
21+
22+
|属性|描述|默认值|备注|
23+
|-|-|-|-|
24+
|SelectedItems|选中项||||
25+
26+
# 事件
27+
28+
|名称|说明|
29+
|-|-|
30+
| SelectionChanged | 选中项改变时触发 |
31+
32+
# 案例
33+
34+
```xml
35+
<hc:Transfer ItemsSource="{Binding DataList}" Margin="32" Height="300">
36+
<hc:Transfer.ItemTemplate>
37+
<DataTemplate>
38+
<TextBlock Text="{Binding Name}"/>
39+
</DataTemplate>
40+
</hc:Transfer.ItemTemplate>
41+
</hc:Transfer>
42+
```
43+
44+
![Transfer](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/Transfer.png)
Lines changed: 91 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,94 @@
11
---
2-
title: 建设中
2+
title: TransitioningContentControl 内容过渡控件
33
---
44

5-
建设中
5+
主要用于变化内容的过渡呈现效果.
6+
7+
```cs
8+
public class TransitioningContentControl : ContentControl
9+
```
10+
11+
# 属性
12+
13+
|属性|描述|默认值|备注|
14+
|-|-|-|-|
15+
|TransitionMode|过渡模式|TransitionMode.Right2Left||
16+
|TransitionStoryboard|过渡动画||||
17+
18+
# 案例
19+
20+
```xml
21+
<Storyboard x:Key="Custom1Transition" x:Shared="False">
22+
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
23+
<DoubleAnimation.EasingFunction>
24+
<ElasticEase Oscillations="1"/>
25+
</DoubleAnimation.EasingFunction>
26+
</DoubleAnimation>
27+
</Storyboard>
28+
29+
<Storyboard x:Key="Custom2Transition" x:Shared="False">
30+
<DoubleAnimation From="10" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
31+
<DoubleAnimation.EasingFunction>
32+
<ElasticEase Oscillations="1"/>
33+
</DoubleAnimation.EasingFunction>
34+
</DoubleAnimation>
35+
</Storyboard>
36+
37+
<Storyboard x:Key="Custom3Transition" x:Shared="False">
38+
<DoubleAnimation From=".8" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
39+
<DoubleAnimation.EasingFunction>
40+
<ElasticEase Oscillations="1"/>
41+
</DoubleAnimation.EasingFunction>
42+
</DoubleAnimation>
43+
</Storyboard>
44+
```
45+
46+
```xml
47+
<Grid Margin="32">
48+
<Grid.RowDefinitions>
49+
<RowDefinition Height="Auto"/>
50+
<RowDefinition/>
51+
</Grid.RowDefinitions>
52+
<ToggleButton Margin="0,0,0,32" IsChecked="True" Name="ButtonVisibilitySwitch" Style="{StaticResource ToggleButtonSwitch}"/>
53+
<UniformGrid Visibility="{Binding IsChecked,ElementName=ButtonVisibilitySwitch,Converter={StaticResource Boolean2VisibilityConverter}}" Grid.Row="1" Rows="4" Columns="3">
54+
<hc:TransitioningContentControl>
55+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Right2Left}" Margin="32"/>
56+
</hc:TransitioningContentControl>
57+
<hc:TransitioningContentControl TransitionMode="Left2Right">
58+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Left2Right}" Margin="32"/>
59+
</hc:TransitioningContentControl>
60+
<hc:TransitioningContentControl TransitionMode="Bottom2Top">
61+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Bottom2Top}" Margin="32"/>
62+
</hc:TransitioningContentControl>
63+
<hc:TransitioningContentControl TransitionMode="Top2Bottom">
64+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Top2Bottom}" Margin="32"/>
65+
</hc:TransitioningContentControl>
66+
<hc:TransitioningContentControl TransitionMode="Right2LeftWithFade">
67+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Right2LeftWithFade}" Margin="32"/>
68+
</hc:TransitioningContentControl>
69+
<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">
70+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Left2RightWithFade}" Margin="32"/>
71+
</hc:TransitioningContentControl>
72+
<hc:TransitioningContentControl TransitionMode="Bottom2TopWithFade">
73+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Bottom2TopWithFade}" Margin="32"/>
74+
</hc:TransitioningContentControl>
75+
<hc:TransitioningContentControl TransitionMode="Top2BottomWithFade">
76+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Top2BottomWithFade}" Margin="32"/>
77+
</hc:TransitioningContentControl>
78+
<hc:TransitioningContentControl TransitionMode="Right2LeftWithFade">
79+
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Right2LeftWithFade}" Margin="32"/>
80+
</hc:TransitioningContentControl>
81+
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom1Transition}">
82+
<Label HorizontalAlignment="Stretch" Content="Custom1" Margin="32"/>
83+
</hc:TransitioningContentControl>
84+
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom2Transition}">
85+
<Label HorizontalAlignment="Stretch" Content="Custom2" Margin="32"/>
86+
</hc:TransitioningContentControl>
87+
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition}">
88+
<Label HorizontalAlignment="Stretch" Content="Custom3" Margin="32"/>
89+
</hc:TransitioningContentControl>
90+
</UniformGrid>
91+
</Grid>
92+
```
93+
94+
![TransitioningContentControl](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/TransitioningContentControl.gif)
Lines changed: 67 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,70 @@
11
---
2-
title: 建设中
2+
title: WaterfallPanel 瀑布流
33
---
44

5-
建设中
5+
该面板可使元素按照等宽不等高或者等高不等宽进行布局.
6+
7+
```cs
8+
public class WaterfallPanel : Panel
9+
```
10+
11+
# 属性
12+
13+
|属性|描述|默认值|备注|
14+
|-|-|-|-|
15+
|Groups|组数|2|等宽不等高时即为列数,等高不等宽即为行数|
16+
|Orientation|排列方向|Orientation.Horizontal|Horizontal为等宽不等高,Vertical为等高不等宽||
17+
18+
# 案例
19+
20+
```xml
21+
<Grid Margin="32">
22+
<Grid.RowDefinitions>
23+
<RowDefinition Height="Auto"/>
24+
<RowDefinition/>
25+
</Grid.RowDefinitions>
26+
<hc:NumericUpDown x:Name="UpDownGroups" HorizontalAlignment="Center" Value="2" Minimum="1" Maximum="3" Width="200" Style="{StaticResource NumericUpDownExtend}" hc:TitleElement.Title="{ex:Lang Key={x:Static langs:LangKeys.Groups}}" hc:TitleElement.TitleWidth="50" hc:TitleElement.TitlePlacement="Left"/>
27+
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,16,0,0">
28+
<hc:ScrollViewer MaxHeight="300">
29+
<hc:WaterfallPanel VerticalAlignment="Center" Width="300" Groups="{Binding Value,ElementName=UpDownGroups}" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
30+
<Border Height="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
31+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
32+
</Border>
33+
<Border Height="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
34+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
35+
</Border>
36+
<Border Height="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
37+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
38+
</Border>
39+
<Border Height="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
40+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
41+
</Border>
42+
<Border Height="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
43+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
44+
</Border>
45+
</hc:WaterfallPanel>
46+
</hc:ScrollViewer>
47+
<hc:ScrollViewer Margin="32,0,0,0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" Orientation="Horizontal" MaxWidth="300">
48+
<hc:WaterfallPanel VerticalAlignment="Center" Height="300" Orientation="Vertical" Groups="{Binding Value,ElementName=UpDownGroups}" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
49+
<Border Width="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
50+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
51+
</Border>
52+
<Border Width="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
53+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
54+
</Border>
55+
<Border Width="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
56+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
57+
</Border>
58+
<Border Width="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
59+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
60+
</Border>
61+
<Border Width="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
62+
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
63+
</Border>
64+
</hc:WaterfallPanel>
65+
</hc:ScrollViewer>
66+
</StackPanel>
67+
</Grid>
68+
```
69+
70+
![WaterfallPanel](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/WaterfallPanel.png)
Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
---
2-
title: 建设中
2+
title: WaveProgressBar 波形进度条
33
---
44

5-
建设中
5+
进度条的一种特殊效果,可用于增强用户体验.
6+
7+
```cs
8+
[TemplatePart(Name = ElementWave, Type = typeof(FrameworkElement))]
9+
[TemplatePart(Name = ElementClip, Type = typeof(FrameworkElement))]
10+
public class WaveProgressBar : RangeBase
11+
```
12+
13+
# 属性
14+
15+
|属性|描述|默认值|备注|
16+
|-|-|-|-|
17+
|Text|进度文本|||
18+
|ShowText|是否显示进度文本|true||
19+
|WaveFill|波浪画刷|||
20+
|WaveThickness|波浪边框粗细|0||
21+
|WaveStroke|波浪边框画刷||||
22+
23+
# 案例
24+
25+
```xml
26+
<StackPanel Orientation="Horizontal" Margin="0,32,0,0">
27+
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}"/>
28+
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" FontSize="20" Margin="16,0,0,0" WaveThickness="4" WaveStroke="#FFFF0080">
29+
<hc:WaveProgressBar.WaveFill>
30+
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
31+
<GradientStop Color="#66FF0080" Offset="0"/>
32+
<GradientStop Color="#FFFF0080" Offset="1"/>
33+
</LinearGradientBrush>
34+
</hc:WaveProgressBar.WaveFill>
35+
</hc:WaveProgressBar>
36+
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="50" Height="50" Style="{StaticResource ProgressBarWarningWave}"/>
37+
</StackPanel>
38+
```
39+
40+
![WaveProgressBar](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Resources/WaveProgressBar.gif)
Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
---
2-
title: 建设中
2+
title: Window 窗口
33
---
44

5-
建设中
5+
HC 对wpf原生 `Window` 的扩展.
6+
7+
```cs
8+
[TemplatePart(Name = ElementNonClientArea, Type = typeof(UIElement))]
9+
public class Window : System.Windows.Window
10+
```
11+
12+
# 属性
13+
14+
|属性|描述|默认值|备注|
15+
|-|-|-|-|
16+
|CloseButtonBackground|关闭按钮背景色|||
17+
|CloseButtonForeground|关闭按钮前景色|||
18+
|CloseButtonHoverBackground|关闭按钮鼠标悬浮背景色|||
19+
|CloseButtonHoverForeground|关闭按钮鼠标悬浮前景色|||
20+
|OtherButtonBackground|其它按钮背景色|||
21+
|OtherButtonForeground|其它按钮前景色|||
22+
|OtherButtonHoverBackground|其它按钮鼠标悬浮背景色|||
23+
|OtherButtonHoverForeground|其它按钮鼠标悬浮前景色|||
24+
|NonClientAreaContent|非客户端区域内容|||
25+
|NonClientAreaBackground|非客户端区域背景色|||
26+
|NonClientAreaForeground|非客户端区域前景色|||
27+
|NonClientAreaHeight|非客户端区域高度|||
28+
|ShowNonClientArea|是否显示非客户端区域|true||
29+
|ShowTitle|是否显示窗口标题|true||
30+
|IsFullScreen|窗口是否处于全屏|false|||
31+
32+
# 案例
33+
34+
```xml
35+
<hc:Window x:Class="HandyControlDemo.Window.CommonWindow"
36+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
37+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
38+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
39+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
40+
xmlns:hc="https://handyorg.github.io/handycontrol"
41+
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
42+
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
43+
mc:Ignorable="d"
44+
Background="{DynamicResource MainContentBackgroundBrush}"
45+
WindowStartupLocation="CenterScreen"
46+
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
47+
Height="450"
48+
Width="800"
49+
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
50+
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}"/>
51+
</hc:Window>
52+
```
53+
54+
![Window](https://raw.githubusercontent.com/HandyOrg/HandyOrgResource/master/HandyControl/Doc/native_controls/Window.png)

doc/themes/next/_config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ baidu_push: false
158158
# External url should start with http:// or https://
159159
menu:
160160
主页: / ||
161-
HandyControl - 2.4.0:
161+
HandyControl - 3.0.0:
162162
default: /handycontrol/ ||
163163
鸣谢: /tnx/ ||
164164
快速开始: /quick_start/ ||
@@ -294,7 +294,7 @@ menu:
294294
TimeBar 时间条: /timeBar/ ||
295295
TimePicker 时间选择器: /timePicker/ ||
296296
Transfer 穿梭框: /transfer/ ||
297-
TransitioningContentControl 内容过度控件: /transitioningContentControl/ ||
297+
TransitioningContentControl 内容过渡控件: /transitioningContentControl/ ||
298298
WaterfallPanel 瀑布流: /waterfallPanel/ ||
299299
WaveProgressBar 波形进度条: /waveProgressBar/ ||
300300
Window 窗口: /window/ ||

0 commit comments

Comments
 (0)