update docs
This commit is contained in:
1 parent
685bb075f2
commit
625aeba450
6 files changed
+289
-12
No files matched your search
@@ -1,5 +1,44 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: Transfer 穿梭框
|
||||
---
|
||||
|
||||
建设中
|
||||
穿梭选择框用直观的方式在两栏中移动元素,完成选择行为。
|
||||
|
||||
```cs
|
||||
[DefaultProperty("Items")]
|
||||
[ContentProperty("Items")]
|
||||
[TemplatePart(Name = ElementPanel, Type = typeof(Panel))]
|
||||
public class SimpleItemsControl : Control
|
||||
```
|
||||
|
||||
```cs
|
||||
[TemplatePart(Name = ElementItemsOrigin, Type = typeof(SimpleItemsControl))]
|
||||
[TemplatePart(Name = ElementItemsSelected, Type = typeof(SimpleItemsControl))]
|
||||
public class Transfer : SimpleItemsControl
|
||||
```
|
||||
|
||||
# 属性
|
||||
|
||||
|属性|描述|默认值|备注|
|
||||
|-|-|-|-|
|
||||
|SelectedItems|选中项||||
|
||||
|
||||
# 事件
|
||||
|
||||
|名称|说明|
|
||||
|-|-|
|
||||
| SelectionChanged | 选中项改变时触发 |
|
||||
|
||||
# 案例
|
||||
|
||||
```xml
|
||||
<hc:Transfer ItemsSource="{Binding DataList}" Margin="32" Height="300">
|
||||
<hc:Transfer.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</DataTemplate>
|
||||
</hc:Transfer.ItemTemplate>
|
||||
</hc:Transfer>
|
||||
```
|
||||
|
||||

|
||||
@@ -1,5 +1,94 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: TransitioningContentControl 内容过渡控件
|
||||
---
|
||||
|
||||
建设中
|
||||
主要用于变化内容的过渡呈现效果.
|
||||
|
||||
```cs
|
||||
public class TransitioningContentControl : ContentControl
|
||||
```
|
||||
|
||||
# 属性
|
||||
|
||||
|属性|描述|默认值|备注|
|
||||
|-|-|-|-|
|
||||
|TransitionMode|过渡模式|TransitionMode.Right2Left||
|
||||
|TransitionStoryboard|过渡动画||||
|
||||
|
||||
# 案例
|
||||
|
||||
```xml
|
||||
<Storyboard x:Key="Custom1Transition" x:Shared="False">
|
||||
<DoubleAnimation From="50" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<ElasticEase Oscillations="1"/>
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
|
||||
<Storyboard x:Key="Custom2Transition" x:Shared="False">
|
||||
<DoubleAnimation From="10" To="0" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<ElasticEase Oscillations="1"/>
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
|
||||
<Storyboard x:Key="Custom3Transition" x:Shared="False">
|
||||
<DoubleAnimation From=".8" To="1" Duration="0:0:0.4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
|
||||
<DoubleAnimation.EasingFunction>
|
||||
<ElasticEase Oscillations="1"/>
|
||||
</DoubleAnimation.EasingFunction>
|
||||
</DoubleAnimation>
|
||||
</Storyboard>
|
||||
```
|
||||
|
||||
```xml
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton Margin="0,0,0,32" IsChecked="True" Name="ButtonVisibilitySwitch" Style="{StaticResource ToggleButtonSwitch}"/>
|
||||
<UniformGrid Visibility="{Binding IsChecked,ElementName=ButtonVisibilitySwitch,Converter={StaticResource Boolean2VisibilityConverter}}" Grid.Row="1" Rows="4" Columns="3">
|
||||
<hc:TransitioningContentControl>
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Right2Left}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Left2Right">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Left2Right}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Bottom2Top">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Bottom2Top}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Top2Bottom">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Top2Bottom}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Right2LeftWithFade">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Right2LeftWithFade}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Left2RightWithFade">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Left2RightWithFade}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Bottom2TopWithFade">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Bottom2TopWithFade}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Top2BottomWithFade">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Top2BottomWithFade}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionMode="Right2LeftWithFade">
|
||||
<Label HorizontalAlignment="Stretch" Content="{x:Static hc:TransitionMode.Right2LeftWithFade}" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom1Transition}">
|
||||
<Label HorizontalAlignment="Stretch" Content="Custom1" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom2Transition}">
|
||||
<Label HorizontalAlignment="Stretch" Content="Custom2" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
<hc:TransitioningContentControl TransitionStoryboard="{StaticResource Custom3Transition}">
|
||||
<Label HorizontalAlignment="Stretch" Content="Custom3" Margin="32"/>
|
||||
</hc:TransitioningContentControl>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
```
|
||||
|
||||

|
||||
@@ -1,5 +1,70 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: WaterfallPanel 瀑布流
|
||||
---
|
||||
|
||||
建设中
|
||||
该面板可使元素按照等宽不等高或者等高不等宽进行布局.
|
||||
|
||||
```cs
|
||||
public class WaterfallPanel : Panel
|
||||
```
|
||||
|
||||
# 属性
|
||||
|
||||
|属性|描述|默认值|备注|
|
||||
|-|-|-|-|
|
||||
|Groups|组数|2|等宽不等高时即为列数,等高不等宽即为行数|
|
||||
|Orientation|排列方向|Orientation.Horizontal|Horizontal为等宽不等高,Vertical为等高不等宽||
|
||||
|
||||
# 案例
|
||||
|
||||
```xml
|
||||
<Grid Margin="32">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<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"/>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" Margin="0,16,0,0">
|
||||
<hc:ScrollViewer MaxHeight="300">
|
||||
<hc:WaterfallPanel VerticalAlignment="Center" Width="300" Groups="{Binding Value,ElementName=UpDownGroups}" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Height="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Height="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</hc:WaterfallPanel>
|
||||
</hc:ScrollViewer>
|
||||
<hc:ScrollViewer Margin="32,0,0,0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" Orientation="Horizontal" MaxWidth="300">
|
||||
<hc:WaterfallPanel VerticalAlignment="Center" Height="300" Orientation="Vertical" Groups="{Binding Value,ElementName=UpDownGroups}" hc:PanelElement.FluidMoveBehavior="{StaticResource BehaviorXY200}">
|
||||
<Border Width="100" Background="{DynamicResource PrimaryBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="140" Background="{DynamicResource DangerBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="100" Background="{DynamicResource SuccessBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="170" Background="{DynamicResource InfoBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
<Border Width="100" Background="{DynamicResource WarningBrush}" Effect="{StaticResource EffectShadow1}" Margin="5">
|
||||
<TextBlock Text="{ex:Lang Key={x:Static langs:LangKeys.ContentDemoStr}}" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="White"/>
|
||||
</Border>
|
||||
</hc:WaterfallPanel>
|
||||
</hc:ScrollViewer>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
```
|
||||
|
||||

|
||||
@@ -1,5 +1,40 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: WaveProgressBar 波形进度条
|
||||
---
|
||||
|
||||
建设中
|
||||
进度条的一种特殊效果,可用于增强用户体验.
|
||||
|
||||
```cs
|
||||
[TemplatePart(Name = ElementWave, Type = typeof(FrameworkElement))]
|
||||
[TemplatePart(Name = ElementClip, Type = typeof(FrameworkElement))]
|
||||
public class WaveProgressBar : RangeBase
|
||||
```
|
||||
|
||||
# 属性
|
||||
|
||||
|属性|描述|默认值|备注|
|
||||
|-|-|-|-|
|
||||
|Text|进度文本|||
|
||||
|ShowText|是否显示进度文本|true||
|
||||
|WaveFill|波浪画刷|||
|
||||
|WaveThickness|波浪边框粗细|0||
|
||||
|WaveStroke|波浪边框画刷||||
|
||||
|
||||
# 案例
|
||||
|
||||
```xml
|
||||
<StackPanel Orientation="Horizontal" Margin="0,32,0,0">
|
||||
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}"/>
|
||||
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" FontSize="20" Margin="16,0,0,0" WaveThickness="4" WaveStroke="#FFFF0080">
|
||||
<hc:WaveProgressBar.WaveFill>
|
||||
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
|
||||
<GradientStop Color="#66FF0080" Offset="0"/>
|
||||
<GradientStop Color="#FFFF0080" Offset="1"/>
|
||||
</LinearGradientBrush>
|
||||
</hc:WaveProgressBar.WaveFill>
|
||||
</hc:WaveProgressBar>
|
||||
<hc:WaveProgressBar Value="{Binding Value,ElementName=SliderDemo}" Margin="16,0,0,0" ShowText="False" Width="50" Height="50" Style="{StaticResource ProgressBarWarningWave}"/>
|
||||
</StackPanel>
|
||||
```
|
||||
|
||||

|
||||
@@ -1,5 +1,54 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: Window 窗口
|
||||
---
|
||||
|
||||
建设中
|
||||
HC 对wpf原生 `Window` 的扩展.
|
||||
|
||||
```cs
|
||||
[TemplatePart(Name = ElementNonClientArea, Type = typeof(UIElement))]
|
||||
public class Window : System.Windows.Window
|
||||
```
|
||||
|
||||
# 属性
|
||||
|
||||
|属性|描述|默认值|备注|
|
||||
|-|-|-|-|
|
||||
|CloseButtonBackground|关闭按钮背景色|||
|
||||
|CloseButtonForeground|关闭按钮前景色|||
|
||||
|CloseButtonHoverBackground|关闭按钮鼠标悬浮背景色|||
|
||||
|CloseButtonHoverForeground|关闭按钮鼠标悬浮前景色|||
|
||||
|OtherButtonBackground|其它按钮背景色|||
|
||||
|OtherButtonForeground|其它按钮前景色|||
|
||||
|OtherButtonHoverBackground|其它按钮鼠标悬浮背景色|||
|
||||
|OtherButtonHoverForeground|其它按钮鼠标悬浮前景色|||
|
||||
|NonClientAreaContent|非客户端区域内容|||
|
||||
|NonClientAreaBackground|非客户端区域背景色|||
|
||||
|NonClientAreaForeground|非客户端区域前景色|||
|
||||
|NonClientAreaHeight|非客户端区域高度|||
|
||||
|ShowNonClientArea|是否显示非客户端区域|true||
|
||||
|ShowTitle|是否显示窗口标题|true||
|
||||
|IsFullScreen|窗口是否处于全屏|false|||
|
||||
|
||||
# 案例
|
||||
|
||||
```xml
|
||||
<hc:Window x:Class="HandyControlDemo.Window.CommonWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:ex="clr-namespace:HandyControlDemo.Tools.Extension"
|
||||
mc:Ignorable="d"
|
||||
Background="{DynamicResource MainContentBackgroundBrush}"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
Title="{ex:Lang Key={x:Static langs:LangKeys.Title}}"
|
||||
Height="450"
|
||||
Width="800"
|
||||
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
|
||||
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}"/>
|
||||
</hc:Window>
|
||||
```
|
||||
|
||||

|
||||
Vendored
+2
-2
@@ -158,7 +158,7 @@ baidu_push: false
|
||||
# External url should start with http:// or https://
|
||||
menu:
|
||||
主页: / ||
|
||||
HandyControl - 2.4.0:
|
||||
HandyControl - 3.0.0:
|
||||
default: /handycontrol/ ||
|
||||
鸣谢: /tnx/ ||
|
||||
快速开始: /quick_start/ ||
|
||||
@@ -294,7 +294,7 @@ menu:
|
||||
TimeBar 时间条: /timeBar/ ||
|
||||
TimePicker 时间选择器: /timePicker/ ||
|
||||
Transfer 穿梭框: /transfer/ ||
|
||||
TransitioningContentControl 内容过度控件: /transitioningContentControl/ ||
|
||||
TransitioningContentControl 内容过渡控件: /transitioningContentControl/ ||
|
||||
WaterfallPanel 瀑布流: /waterfallPanel/ ||
|
||||
WaveProgressBar 波形进度条: /waveProgressBar/ ||
|
||||
Window 窗口: /window/ ||
|
||||
|
||||
Reference in new issue
Block a user