36 files changed
+725
-243
No files matched your search
@@ -1,5 +1,42 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: TipElement 提示元素
|
||||
---
|
||||
|
||||
建设中
|
||||
# 属性
|
||||
|
||||
| 名称 | 用途 |
|
||||
| ---------- | -------- |
|
||||
| Placement | 提示元素显示位置 |
|
||||
| Visibility | 是否可见 |
|
||||
|
||||
|
||||
# 使用案例
|
||||
|
||||
## Placement 提示元素显示位置
|
||||
|
||||
该属性,用于设定提示元素显示位置,目前支持BottomRight和TopLeft(默认值)
|
||||
|
||||
```
|
||||
<hc:RangeSlider Width="400"
|
||||
hc:TipElement.Visibility="Visible"
|
||||
TickPlacement="BottomRight"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100" ValueEnd="60"
|
||||
TickFrequency="10"
|
||||
Margin="0,32,0,0"/>
|
||||
<hc:RangeSlider Width="400"
|
||||
hc:TipElement.Visibility="Visible"
|
||||
hc:TipElement.Placement="BottomRight"
|
||||
TickPlacement="BottomRight"
|
||||
IsSnapToTickEnabled="True"
|
||||
Maximum="100" ValueEnd="60"
|
||||
TickFrequency="10"
|
||||
Margin="0,32,0,0"/>
|
||||
```
|
||||
|
||||
效果
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
@@ -12,32 +12,32 @@ title: Border 边框
|
||||
|
||||
``` 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 Style="{StaticResource BorderRegion}" 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 Style="{StaticResource BorderRegion}" 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 Style="{StaticResource BorderRegion}" 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 Style="{StaticResource BorderRegion}" 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 Style="{StaticResource BorderRegion}" 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 Style="{StaticResource BorderRegion}" 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>
|
||||
@@ -45,6 +45,8 @@ title: Border 边框
|
||||
</UniformGrid>
|
||||
```
|
||||
|
||||
提示:新版本中使用的`BorderRegion`,有别于老版本使用样式`BorderRegionStyle`,由直角变更为圆角
|
||||
|
||||
# BorderVerticallySplitter
|
||||
|
||||
此样式使用1单位宽度的Border来分割横向排列的控件。
|
||||
|
||||
@@ -1,5 +1,18 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: Image图片
|
||||
---
|
||||
|
||||
建设中
|
||||
在`HandyControl`中,对应原生的`Image`控件,仅仅提供了一个默认的控件样式,并未提供特殊样式,对于个性化定制,需要使用者自行定制。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<StackPanel Background="LightGray">
|
||||
<Image Source="Resources/Images/Image_basestyle.png" Margin="0,10"></Image>
|
||||
<Image Source="Resources/Images/Image_basestyle.png" RenderOptions.BitmapScalingMode="HighQuality" Stretch="Uniform"></Image>
|
||||
</StackPanel>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,87 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: Lable标签
|
||||
---
|
||||
|
||||
建设中
|
||||
# LabelBaseStyle
|
||||
|
||||
Label标签默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Label Content="Label默认样式" Margin="10"></Label>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# LabelPrimary : LabelBaseStyle
|
||||
|
||||
主样式
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Label Content="LabelPrimary样式" Margin="10" Style="{DynamicResource LabelPrimary}"></Label>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# LabelSuccess : LabelBaseStyle
|
||||
|
||||
成功类型样式
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Label Content="LabelSuccess样式" Margin="10" Style="{DynamicResource LabelSuccess}"></Label>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# LabelInfo : LabelBaseStyle
|
||||
|
||||
信息类型样式
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Label Content="LabelInfo样式" Margin="10" Style="{DynamicResource LabelInfo}"></Label>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# LabelWarning : LabelBaseStyle
|
||||
|
||||
警告类型样式
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Label Content="LabelWarning样式" Margin="10" Style="{DynamicResource LabelWarning}"></Label>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# LabelDanger : LabelBaseStyle
|
||||
|
||||
危险类型样式
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Label Content="LabelDanger样式" Margin="10" Style="{DynamicResource LabelDanger}"></Label>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,147 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ListBox 列表框
|
||||
---
|
||||
|
||||
建设中
|
||||
# ListBoxBaseStyle
|
||||
|
||||
ListBox默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Style BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox"/>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# ListBoxCustom : ListBoxBaseStyle
|
||||
|
||||
ListBox列表Custom样式,该样式保留了Listbox的基本属性样式,而数据显示样式由当前用户自定义,实现个性化定制。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<ListBox Margin="10" ItemsSource="{Binding Datas}"
|
||||
Style="{DynamicResource ListBoxCustom}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="0,5">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Path DockPanel.Dock="Left" Fill="YellowGreen" Width="20" Margin="10,0,10,0" HorizontalAlignment="Center" Data="{DynamicResource BubbleTailGeometry}"></Path>
|
||||
<TextBlock Padding="10" Text="{Binding Name}"></TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# WrapPanelHorizontalListBox : ListBoxCustom
|
||||
|
||||
布局容器为WrapPanel,水平方向显示样式。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<ListBox Margin="10" ItemsSource="{Binding Datas}"
|
||||
Style="{DynamicResource WrapPanelHorizontalListBox}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="5,0">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Path DockPanel.Dock="Left" Fill="YellowGreen" Width="20" Margin="10,0,10,0" HorizontalAlignment="Center" Data="{DynamicResource BubbleTailGeometry}"></Path>
|
||||
<TextBlock Padding="10" Text="{Binding Name}"></TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# WrapPanelVerticalListBox : ListBoxCustom
|
||||
|
||||
布局容器为WrapPanel,垂直方向显示样式。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<ListBox Margin="10" ItemsSource="{Binding Datas}"
|
||||
Style="{DynamicResource WrapPanelVerticalListBox}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="0,5">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Path DockPanel.Dock="Left" Fill="YellowGreen" Width="20" Margin="10,0,10,0" HorizontalAlignment="Center" Data="{DynamicResource BubbleTailGeometry}"></Path>
|
||||
<TextBlock Padding="10" Text="{Binding Name}"></TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# StackPanelHorizontalListBox : ListBoxCustom
|
||||
|
||||
布局容器为StackPanel,水平方向显示样式。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<ListBox Margin="10" ItemsSource="{Binding Datas}"
|
||||
Style="{DynamicResource StackPanelHorizontalListBox}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="5,0">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Path DockPanel.Dock="Left" Fill="YellowGreen" Width="20" Margin="10,0,10,0" HorizontalAlignment="Center" Data="{DynamicResource BubbleTailGeometry}"></Path>
|
||||
<TextBlock Padding="10" Text="{Binding Name}"></TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# StackPanelVerticalListBox : ListBoxCustom
|
||||
|
||||
布局容器为StackPanel,垂直方向显示样式。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<ListBox Margin="10" ItemsSource="{Binding Datas}"
|
||||
Style="{DynamicResource StackPanelVerticalListBox}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border BorderThickness="1" BorderBrush="Black" Margin="0,1">
|
||||
<DockPanel LastChildFill="True">
|
||||
<Path DockPanel.Dock="Left" Fill="YellowGreen" Width="20" Margin="10,0,10,0" HorizontalAlignment="Center" Data="{DynamicResource BubbleTailGeometry}"></Path>
|
||||
<TextBlock Padding="10" Text="{Binding Name}"></TextBlock>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,23 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ListView 列表视图
|
||||
---
|
||||
|
||||
建设中
|
||||
`HandyControl`中仅提供了一个默认的`ListView`样式,可根据个人需求,自行定义。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<ListView ItemsSource="{Binding DataList}" Margin="20">
|
||||
<ListView.View>
|
||||
<GridView>
|
||||
<GridViewColumn Width="80" Header="标题1" DisplayMemberBinding="{Binding Index}"/>
|
||||
<GridViewColumn Width="100" Header="标题2" DisplayMemberBinding="{Binding Name}"/>
|
||||
<GridViewColumn Width="200" Header="标题3" DisplayMemberBinding="{Binding Remark}"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
</ListView>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,23 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: Menu 菜单
|
||||
---
|
||||
|
||||
建设中
|
||||
# MenuBaseStyle
|
||||
|
||||
菜单默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<Menu ItemsSource="{Binding Menus}">
|
||||
<Menu.ItemTemplate>
|
||||
<HierarchicalDataTemplate ItemsSource="{Binding Children}">
|
||||
<TextBlock Text="{Binding Name}"></TextBlock>
|
||||
</HierarchicalDataTemplate>
|
||||
</Menu.ItemTemplate>
|
||||
</Menu>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,45 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: PasswordBox 密码框
|
||||
---
|
||||
|
||||
建设中
|
||||
# PasswordBoxBaseStyle
|
||||
|
||||
原生密码框默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<PasswordBox PasswordChar="*" VerticalAlignment="Center" Width="120"></PasswordBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
|
||||
# PasswordBoxExtendBaseStyle : PasswordBoxBaseStyle
|
||||
|
||||
原生密码框扩展默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# PasswordBoxExtend : PasswordBoxExtendBaseStyle
|
||||
|
||||
相对于原生密码框默认样式,它借助于附加属性可以实现标题、水印的功能。
|
||||
|
||||
{% note info no-icon %}
|
||||
用例:
|
||||
{% code %}
|
||||
<!--为使普通密码输入文本框显示水印,需要设定PasswordBoxAttach.PasswordLength="0"-->
|
||||
<PasswordBox Style="{DynamicResource PasswordBoxExtend}" PasswordChar="*"
|
||||
hc:PasswordBoxAttach.PasswordLength="0"
|
||||
hc:InfoElement.Placeholder="请输入密码"
|
||||
VerticalAlignment="Center"
|
||||
Width="120"></PasswordBox>
|
||||
<PasswordBox Style="{DynamicResource PasswordBoxExtend}" PasswordChar="*"
|
||||
hc:TitleElement.Title="用户密码:"
|
||||
hc:TitleElement.TitleAlignment="Top"
|
||||
VerticalAlignment="Center"
|
||||
Width="120"></PasswordBox>
|
||||
{% endcode %}
|
||||
|
||||

|
||||
|
||||
{% endnote %}
|
||||
@@ -1,5 +1,79 @@
|
||||
---
|
||||
title: 建设中
|
||||
title: ProgressBar 进度条
|
||||
---
|
||||
|
||||
建设中
|
||||
# ProgressBarBaseStyle
|
||||
|
||||
进度条默认样式,不推荐直接使用,应该始终被其它样式以BasedOn的方式使用。
|
||||
|
||||
# 其他样式
|
||||
|
||||
`HandyControl`中自带的其他样式和效果,其中包含如下样式:
|
||||
|
||||
| 样式Key | 用途 |父样式|
|
||||
| ------------------ | ---- ||
|
||||
| ProgressBarSuccess | 成功色进度条 |ProgressBarBaseStyle|
|
||||
| ProgressBarInfo | 提示色进度条 |ProgressBarBaseStyle|
|
||||
| ProgressBarWarning | 警告色进度条 |ProgressBarBaseStyle|
|
||||
| ProgressBarDanger | 危险色进度条 |ProgressBarBaseStyle|
|
||||
| ProgressBarStripeBaseStyle | 条纹进度条默认样式(不推荐直接使用) |-|
|
||||
| ProgressBarPrimaryStripe | 主题色条纹进度条 |ProgressBarStripeBaseStyle|
|
||||
| ProgressBarSuccessStripe | 成功色条纹进度条 |ProgressBarStripeBaseStyle|
|
||||
| ProgressBarInfoStripe | 信息色条纹进度条 |ProgressBarStripeBaseStyle|
|
||||
| ProgressBarWarningStripe | 警告色条纹进度条 |ProgressBarStripeBaseStyle|
|
||||
| ProgressBarDangerStripe | 危险色条纹进度条 |ProgressBarStripeBaseStyle|
|
||||
| ProgressBarFlat | 扁平风格 |-|
|
||||
|
||||
案例:
|
||||
```xml
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="默认样式"></TextBlock>
|
||||
<ProgressBar Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarSuccess"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarSuccess}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarInfo"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarInfo}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarWarning"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarWarning}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarDanger"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarDanger}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarPrimaryStripe"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarPrimaryStripe}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarSuccessStripe"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarSuccessStripe}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarInfoStripe"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarInfoStripe}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarWarningStripe"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarWarningStripe}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarDangerStripe"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarDangerStripe}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
<StackPanel Margin="20">
|
||||
<TextBlock Text="ProgressBarFlat"></TextBlock>
|
||||
<ProgressBar Style="{DynamicResource ProgressBarFlat}" Value="40"></ProgressBar>
|
||||
</StackPanel>
|
||||
```
|
||||
效果:
|
||||

|
||||
|
||||
# 温馨提示
|
||||
|
||||
对于颜色、圆角或其它自定义需求,可参考[进度条样式源码](https://github.com/HandyOrg/HandyControl/blob/master/src/Shared/HandyControl_Shared/Themes/Styles/ProgressBar.xaml)自行定义。
|
||||
@@ -103,7 +103,7 @@
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="controls:ScrollViewer.IsEnableInertia" Value="False"/>
|
||||
<Setter Property="controls:ScrollViewer.IsInertiaEnabled" Value="False"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"/>
|
||||
@@ -111,7 +111,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TreeView">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<controls:ScrollViewer x:Name="_tv_scrollviewer_" IsEnableInertia="{Binding Path=(controls:ScrollViewer.IsEnableInertia),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<controls:ScrollViewer x:Name="_tv_scrollviewer_" IsInertiaEnabled="{Binding Path=(controls:ScrollViewer.IsInertiaEnabled),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<ItemsPresenter/>
|
||||
</controls:ScrollViewer>
|
||||
</Border>
|
||||
|
||||
@@ -103,14 +103,14 @@
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="controls:ScrollViewer.IsEnableInertia" Value="False"/>
|
||||
<Setter Property="controls:ScrollViewer.IsInertiaEnabled" Value="False"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TreeView">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<controls:ScrollViewer x:Name="_tv_scrollviewer_" IsEnableInertia="{Binding Path=(controls:ScrollViewer.IsEnableInertia),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<controls:ScrollViewer x:Name="_tv_scrollviewer_" IsInertiaEnabled="{Binding Path=(controls:ScrollViewer.IsInertiaEnabled),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<ItemsPresenter/>
|
||||
</controls:ScrollViewer>
|
||||
</Border>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
|
||||
<Setter Property="ScrollViewer.PanningMode" Value="Both"/>
|
||||
<Setter Property="controls:ScrollViewer.IsEnableInertia" Value="False"/>
|
||||
<Setter Property="controls:ScrollViewer.IsInertiaEnabled" Value="False"/>
|
||||
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"/>
|
||||
@@ -111,7 +111,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="TreeView">
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
|
||||
<controls:ScrollViewer x:Name="_tv_scrollviewer_" IsEnableInertia="{Binding Path=(controls:ScrollViewer.IsEnableInertia),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<controls:ScrollViewer x:Name="_tv_scrollviewer_" IsInertiaEnabled="{Binding Path=(controls:ScrollViewer.IsInertiaEnabled),RelativeSource={RelativeSource TemplatedParent}}" Template="{StaticResource ScrollViewerBaseControlTemplate}" Background="{TemplateBinding Background}" CanContentScroll="false" Focusable="false" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
|
||||
<ItemsPresenter/>
|
||||
</controls:ScrollViewer>
|
||||
</Border>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<userControl:LeftMainContent/>
|
||||
<userControl:MainContent Grid.Column="1"/>
|
||||
<GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource BorderBrush}"/>
|
||||
<hc:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
|
||||
<hc:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsInertiaEnabled="True" IsPenetrating="True">
|
||||
<StackPanel hc:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</hc:ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:SimplePanel Width="500" Height="400">
|
||||
<hc:ScrollViewer Name="ScrollViewerDemo" IsEnableInertia="True" Margin="0,10,0,0">
|
||||
<hc:ScrollViewer Name="ScrollViewerDemo" IsInertiaEnabled="True" Margin="0,10,0,0">
|
||||
<Border Height="2000" Margin="8,0">
|
||||
<Border.Background>
|
||||
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
<hc:OutlineText Margin="0,10,0,0" FontSize="30" FontStyle="Italic" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=8}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" TextWrapping="Wrap" TextTrimming="CharacterEllipsis" FontSize="50" StrokeThickness="2" Fill="{DynamicResource DangerBrush}" Stroke="{DynamicResource PrimaryBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=5}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" StrokePosition="Outside" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
<hc:OutlineText Margin="0,10,0,0" StrokePosition="InSide" FontSize="80" FontWeight="Bold" StrokeThickness="4" Fill="{DynamicResource PrimaryBrush}" Stroke="{DynamicResource DangerBrush}" Text="{Binding Source={x:Static langs:Lang.Text}, Converter={StaticResource StringRepeatConverter}, ConverterParameter=2}"/>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -13,7 +13,7 @@
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<hc:ScrollViewer Orientation="Horizontal" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" IsEnableInertia="True">
|
||||
<hc:ScrollViewer Orientation="Horizontal" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Hidden" IsInertiaEnabled="True">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
@@ -44,7 +44,7 @@
|
||||
</hc:ScrollViewer>
|
||||
</Border>
|
||||
<Border Grid.Row="1" BorderThickness="1" BorderBrush="{DynamicResource BorderBrush}" Margin="0,16,0,0">
|
||||
<hc:ScrollViewer IsEnableInertia="True">
|
||||
<hc:ScrollViewer IsInertiaEnabled="True">
|
||||
<WrapPanel Orientation="Horizontal">
|
||||
<Border Style="{StaticResource BorderRegion}" Width="200" Height="200" Margin="10,10,32,10">
|
||||
<Border Background="{DynamicResource PrimaryBrush}">
|
||||
|
||||
@@ -40,22 +40,22 @@
|
||||
</hc:TabItem>
|
||||
</hc:TabControl>
|
||||
<StackPanel Orientation="Horizontal" Margin="32,32,32,16">
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="0" Content="IsEnableTabFill = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="0" Content="IsTabFillEnabled = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="ShowCloseButton = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsDraggable = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsEnableAnimation = True"/>
|
||||
<Label Style="{StaticResource LabelPrimary}" Margin="16,0,0,0" Content="IsAnimationEnabled = True"/>
|
||||
</StackPanel>
|
||||
<hc:TabControl x:Name="TabControlDemo" IsEnableAnimation="True" ShowCloseButton="True" IsDraggable="True" IsEnableTabFill="True" Margin="32,0,32,32" Width="800" Height="300">
|
||||
<hc:TabItem Header="TabItem1">
|
||||
<hc:TabControl x:Name="TabControlDemo" IsAnimationEnabled="True" ShowCloseButton="True" IsDraggable="True" IsTabFillEnabled="True" Margin="32,0,32,32" Width="800" Height="300">
|
||||
<hc:TabItem Header="TabItem1" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource ConfigGeometry}">
|
||||
<hc:SimplePanel Background="{DynamicResource RegionBrush}"/>
|
||||
</hc:TabItem>
|
||||
<hc:TabItem IsSelected="True" Header="TabItem2">
|
||||
<hc:TabItem IsSelected="True" Header="TabItem2" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource CalendarGeometry}">
|
||||
<hc:SimplePanel Tag="123" Background="#FFE8563F"/>
|
||||
</hc:TabItem>
|
||||
<hc:TabItem Header="TabItem3">
|
||||
<hc:TabItem Header="TabItem3" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource WindowsGeometry}">
|
||||
<hc:SimplePanel Background="#FF3F4EE8"/>
|
||||
</hc:TabItem>
|
||||
<hc:TabItem Header="TabItem4">
|
||||
<hc:TabItem Header="TabItem4" hc:IconElement.Height="16" hc:IconElement.Width="16" hc:IconElement.Geometry="{StaticResource ClockGeometry}">
|
||||
<hc:SimplePanel Background="#FFE83F6D"/>
|
||||
</hc:TabItem>
|
||||
<hc:TabItem Header="TabItem5">
|
||||
@@ -68,7 +68,7 @@
|
||||
<hc:SimplePanel Background="#FFE8E03F"/>
|
||||
</hc:TabItem>
|
||||
</hc:TabControl>
|
||||
<hc:TabControl IsEnableAnimation="True" ShowCloseButton="True" IsDraggable="True" ItemsSource="{Binding DataList}" Width="800" Height="300">
|
||||
<hc:TabControl IsAnimationEnabled="True" ShowCloseButton="True" IsDraggable="True" ItemsSource="{Binding DataList}" Width="800" Height="300">
|
||||
<TabControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Header}"/>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Border hc:ScrollViewer.IsEnableInertia="True"
|
||||
<Border hc:ScrollViewer.IsInertiaEnabled="True"
|
||||
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
|
||||
xmlns:command="http://www.galasoft.ch/mvvmlight"
|
||||
x:Class="HandyControlDemo.UserControl.LeftMainContent"
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:ScrollViewer IsEnableInertia="True">
|
||||
<hc:ScrollViewer IsInertiaEnabled="True">
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel ItemWidth="160" ItemHeight="130">
|
||||
<StackPanel>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:ScrollViewer IsEnableInertia="True">
|
||||
<hc:ScrollViewer IsInertiaEnabled="True">
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel ItemWidth="160" ItemHeight="130">
|
||||
<StackPanel>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol">
|
||||
<hc:TransitioningContentControl>
|
||||
<hc:ScrollViewer IsEnableInertia="True">
|
||||
<hc:ScrollViewer IsInertiaEnabled="True">
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel ItemWidth="160" ItemHeight="130">
|
||||
<StackPanel>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
<hc:ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
|
||||
<hc:ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsInertiaEnabled="True" IsPenetrating="True">
|
||||
<StackPanel hc:Growl.Token="{x:Static data:MessageToken.GrowlDemoPanel}" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</hc:ScrollViewer>
|
||||
</hc:SimplePanel>
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
_tickCount++;
|
||||
if (_tickCount >= _waitTime) Close();
|
||||
if (_tickCount >= _waitTime) Close(true);
|
||||
};
|
||||
_timerClose.Start();
|
||||
}
|
||||
@@ -462,6 +462,96 @@ namespace HandyControl.Controls
|
||||
#endif
|
||||
}
|
||||
|
||||
private static void InitGrowlInfo(ref GrowlInfo growlInfo, InfoType infoType)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
growlInfo.Type = infoType;
|
||||
|
||||
switch (infoType)
|
||||
{
|
||||
case InfoType.Success:
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.SuccessGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.SuccessBrush;
|
||||
}
|
||||
else
|
||||
{
|
||||
growlInfo.IconKey ??= ResourceToken.SuccessGeometry;
|
||||
growlInfo.IconBrushKey ??= ResourceToken.SuccessBrush;
|
||||
}
|
||||
break;
|
||||
case InfoType.Info:
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.InfoGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.InfoBrush;
|
||||
}
|
||||
else
|
||||
{
|
||||
growlInfo.IconKey ??= ResourceToken.InfoGeometry;
|
||||
growlInfo.IconBrushKey ??= ResourceToken.InfoBrush;
|
||||
}
|
||||
break;
|
||||
case InfoType.Warning:
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.WarningGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.WarningBrush;
|
||||
}
|
||||
else
|
||||
{
|
||||
growlInfo.IconKey ??= ResourceToken.WarningGeometry;
|
||||
growlInfo.IconBrushKey ??= ResourceToken.WarningBrush;
|
||||
}
|
||||
break;
|
||||
case InfoType.Error:
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.ErrorGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.DangerBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
growlInfo.IconKey ??= ResourceToken.ErrorGeometry;
|
||||
growlInfo.IconBrushKey ??= ResourceToken.DangerBrush;
|
||||
}
|
||||
break;
|
||||
case InfoType.Fatal:
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.FatalGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.ShowCloseButton = false;
|
||||
if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
growlInfo.IconKey ??= ResourceToken.FatalGeometry;
|
||||
growlInfo.IconBrushKey ??= ResourceToken.PrimaryTextBrush;
|
||||
}
|
||||
break;
|
||||
case InfoType.Ask:
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.AskGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.AccentBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.ShowCloseButton = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
growlInfo.IconKey ??= ResourceToken.AskGeometry;
|
||||
growlInfo.IconBrushKey ??= ResourceToken.AccentBrush;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(infoType), infoType, null);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 成功
|
||||
/// </summary>
|
||||
@@ -479,13 +569,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void Success(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.SuccessGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.SuccessBrush;
|
||||
growlInfo.Type = InfoType.Success;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Success);
|
||||
Show(growlInfo);
|
||||
}
|
||||
|
||||
@@ -504,13 +588,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void SuccessGlobal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.SuccessGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.SuccessBrush;
|
||||
growlInfo.Type = InfoType.Success;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Success);
|
||||
ShowGlobal(growlInfo);
|
||||
}
|
||||
|
||||
@@ -531,13 +609,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void Info(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.InfoGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.InfoBrush;
|
||||
growlInfo.Type = InfoType.Info;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Info);
|
||||
Show(growlInfo);
|
||||
}
|
||||
|
||||
@@ -556,13 +628,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void InfoGlobal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.InfoGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.InfoBrush;
|
||||
growlInfo.Type = InfoType.Info;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Info);
|
||||
ShowGlobal(growlInfo);
|
||||
}
|
||||
|
||||
@@ -583,13 +649,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void Warning(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.WarningGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.WarningBrush;
|
||||
growlInfo.Type = InfoType.Warning;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Warning);
|
||||
Show(growlInfo);
|
||||
}
|
||||
|
||||
@@ -608,13 +668,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void WarningGlobal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.WarningGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.WarningBrush;
|
||||
growlInfo.Type = InfoType.Warning;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Warning);
|
||||
ShowGlobal(growlInfo);
|
||||
}
|
||||
|
||||
@@ -635,14 +689,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void Error(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.ErrorGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.DangerBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.Type = InfoType.Error;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Error);
|
||||
Show(growlInfo);
|
||||
}
|
||||
|
||||
@@ -661,14 +708,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void ErrorGlobal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.ErrorGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.DangerBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.Type = InfoType.Error;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Error);
|
||||
ShowGlobal(growlInfo);
|
||||
}
|
||||
|
||||
@@ -689,16 +729,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void Fatal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.FatalGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.ShowCloseButton = false;
|
||||
growlInfo.Type = InfoType.Fatal;
|
||||
if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Fatal);
|
||||
Show(growlInfo);
|
||||
}
|
||||
|
||||
@@ -717,16 +748,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void FatalGlobal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.FatalGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.PrimaryTextBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.ShowCloseButton = false;
|
||||
growlInfo.Type = InfoType.Fatal;
|
||||
if (GrowlPanel.ContextMenu != null) GrowlPanel.ContextMenu.Opacity = 0;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Fatal);
|
||||
ShowGlobal(growlInfo);
|
||||
}
|
||||
|
||||
@@ -749,15 +771,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void Ask(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.AskGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.AccentBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.ShowCloseButton = false;
|
||||
growlInfo.Type = InfoType.Ask;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Ask);
|
||||
Show(growlInfo);
|
||||
}
|
||||
|
||||
@@ -778,15 +792,7 @@ namespace HandyControl.Controls
|
||||
/// <param name="growlInfo"></param>
|
||||
public static void AskGlobal(GrowlInfo growlInfo)
|
||||
{
|
||||
if (growlInfo == null) throw new ArgumentNullException(nameof(growlInfo));
|
||||
if (!growlInfo.IsCustom)
|
||||
{
|
||||
growlInfo.IconKey = ResourceToken.AskGeometry;
|
||||
growlInfo.IconBrushKey = ResourceToken.AccentBrush;
|
||||
growlInfo.StaysOpen = true;
|
||||
growlInfo.ShowCloseButton = false;
|
||||
growlInfo.Type = InfoType.Ask;
|
||||
}
|
||||
InitGrowlInfo(ref growlInfo, InfoType.Ask);
|
||||
ShowGlobal(growlInfo);
|
||||
}
|
||||
|
||||
@@ -795,8 +801,13 @@ namespace HandyControl.Controls
|
||||
/// <summary>
|
||||
/// 关闭
|
||||
/// </summary>
|
||||
private void Close()
|
||||
private void Close(bool invokeActionBeforeClose = false, bool invokeParam = true)
|
||||
{
|
||||
if (invokeActionBeforeClose)
|
||||
{
|
||||
ActionBeforeClose?.Invoke(invokeParam);
|
||||
}
|
||||
|
||||
_timerClose?.Stop();
|
||||
var transform = new TranslateTransform();
|
||||
_gridMain.RenderTransform = transform;
|
||||
@@ -862,20 +873,8 @@ namespace HandyControl.Controls
|
||||
GrowlWindow = null;
|
||||
}
|
||||
|
||||
private void ButtonCancel_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ActionBeforeClose?.Invoke(false) == true)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
private void ButtonCancel_OnClick(object sender, RoutedEventArgs e) => Close(true, false);
|
||||
|
||||
private void ButtonOk_OnClick(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (ActionBeforeClose?.Invoke(true) == true)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
}
|
||||
private void ButtonOk_OnClick(object sender, RoutedEventArgs e) => Close(true);
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace HandyControl.Controls
|
||||
Content = new ScrollViewer
|
||||
{
|
||||
VerticalScrollBarVisibility = ScrollBarVisibility.Hidden,
|
||||
IsEnableInertia = true,
|
||||
IsInertiaEnabled = true,
|
||||
Content = GrowlPanel
|
||||
};
|
||||
}
|
||||
|
||||
@@ -25,36 +25,29 @@ namespace HandyControl.Controls
|
||||
|
||||
private TextBox _textBox;
|
||||
|
||||
private bool _updateText;
|
||||
|
||||
#endregion Data
|
||||
|
||||
public NumericUpDown()
|
||||
{
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) =>
|
||||
{
|
||||
if (IsReadOnly)
|
||||
return;
|
||||
if (IsReadOnly) return;
|
||||
|
||||
Value += Increment;
|
||||
_textBox.Text = CurrentText;
|
||||
_textBox.Select(_textBox.Text.Length, 0);
|
||||
}));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Next, (s, e) =>
|
||||
{
|
||||
if (IsReadOnly)
|
||||
return;
|
||||
|
||||
if (IsReadOnly) return;
|
||||
|
||||
Value -= Increment;
|
||||
_textBox.Text = CurrentText;
|
||||
_textBox.Select(_textBox.Text.Length, 0);
|
||||
}));
|
||||
CommandBindings.Add(new CommandBinding(ControlCommands.Clear, (s, e) =>
|
||||
{
|
||||
if (IsReadOnly)
|
||||
return;
|
||||
if (IsReadOnly) return;
|
||||
|
||||
SetCurrentValue(ValueProperty, ValueBoxes.Double0Box);
|
||||
_textBox.Text = string.Empty;
|
||||
}));
|
||||
|
||||
Loaded += (s, e) => OnApplyTemplate();
|
||||
@@ -102,7 +95,9 @@ namespace HandyControl.Controls
|
||||
if (!VerifyData()) return;
|
||||
if (double.TryParse(_textBox.Text, out var value))
|
||||
{
|
||||
_updateText = false;
|
||||
Value = value;
|
||||
_updateText = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,18 +111,15 @@ namespace HandyControl.Controls
|
||||
|
||||
private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (IsReadOnly)
|
||||
return;
|
||||
if (IsReadOnly) return;
|
||||
|
||||
if (e.Key == Key.Up)
|
||||
{
|
||||
Value += Increment;
|
||||
_textBox.Text = CurrentText;
|
||||
}
|
||||
else if (e.Key == Key.Down)
|
||||
{
|
||||
Value -= Increment;
|
||||
_textBox.Text = CurrentText;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,11 +127,9 @@ namespace HandyControl.Controls
|
||||
{
|
||||
base.OnMouseWheel(e);
|
||||
|
||||
if (_textBox.IsFocused&&IsReadOnly==false)
|
||||
if (_textBox.IsFocused && !IsReadOnly)
|
||||
{
|
||||
Value += e.Delta > 0 ? Increment : -Increment;
|
||||
_textBox.Text = CurrentText;
|
||||
_textBox.Select(_textBox.Text.Length, 0);
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
@@ -178,9 +168,10 @@ namespace HandyControl.Controls
|
||||
{
|
||||
var ctl = (NumericUpDown) d;
|
||||
var v = (double) e.NewValue;
|
||||
if (ctl._textBox != null)
|
||||
if (ctl._updateText && ctl._textBox != null)
|
||||
{
|
||||
ctl._textBox.Text = v.ToString();
|
||||
ctl._textBox.Text = ctl.CurrentText;
|
||||
ctl._textBox.Select(ctl._textBox.Text.Length, 0);
|
||||
}
|
||||
|
||||
ctl.OnValueChanged(new FunctionEventArgs<double>(ValueChangedEvent, ctl)
|
||||
@@ -375,22 +366,21 @@ namespace HandyControl.Controls
|
||||
set => SetValue(ShowClearButtonProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标识 IsReadOnly 依赖属性。
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsReadOnlyProperty = DependencyProperty.Register(
|
||||
"IsReadOnly", typeof(bool), typeof(NumericUpDown), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置一个值,该值指示NumericUpDown是否只读。
|
||||
/// </summary>
|
||||
public bool IsReadOnly
|
||||
{
|
||||
get => (bool)GetValue(IsReadOnlyProperty);
|
||||
get => (bool) GetValue(IsReadOnlyProperty);
|
||||
set => SetValue(IsReadOnlyProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 标识 IsReadOnly 依赖属性。
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsReadOnlyProperty =
|
||||
DependencyProperty.Register(nameof(IsReadOnly), typeof(bool), typeof(NumericUpDown), new PropertyMetadata(default(bool)));
|
||||
|
||||
|
||||
public Func<string, OperationResult<bool>> VerifyFunc { get; set; }
|
||||
|
||||
public virtual bool VerifyData()
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
_scrollViewer.ScrollChanged += ScrollViewer_ScrollChanged;
|
||||
|
||||
if (_scrollViewer is ScrollViewer scrollViewerHandy && Animated && scrollViewerHandy.IsEnableInertia)
|
||||
if (_scrollViewer is ScrollViewer scrollViewerHandy && Animated && scrollViewerHandy.IsInertiaEnabled)
|
||||
{
|
||||
_gotoTopAction = () => scrollViewerHandy.ScrollToTopInternal(AnimationTime);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
if (!CanMouseWheel) return;
|
||||
|
||||
if (!IsEnableInertia)
|
||||
if (!IsInertiaEnabled)
|
||||
{
|
||||
if (Orientation == Orientation.Vertical)
|
||||
{
|
||||
@@ -142,26 +142,26 @@ namespace HandyControl.Controls
|
||||
/// <summary>
|
||||
/// 是否支持惯性
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsEnableInertiaProperty = DependencyProperty.RegisterAttached(
|
||||
"IsEnableInertia", typeof(bool), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
public static readonly DependencyProperty IsInertiaEnabledProperty = DependencyProperty.RegisterAttached(
|
||||
"IsInertiaEnabled", typeof(bool), typeof(ScrollViewer), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
public static void SetIsEnableInertia(DependencyObject element, bool value)
|
||||
public static void SetIsInertiaEnabled(DependencyObject element, bool value)
|
||||
{
|
||||
element.SetValue(IsEnableInertiaProperty, value);
|
||||
element.SetValue(IsInertiaEnabledProperty, value);
|
||||
}
|
||||
|
||||
public static bool GetIsEnableInertia(DependencyObject element)
|
||||
public static bool GetIsInertiaEnabled(DependencyObject element)
|
||||
{
|
||||
return (bool)element.GetValue(IsEnableInertiaProperty);
|
||||
return (bool)element.GetValue(IsInertiaEnabledProperty);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否支持惯性
|
||||
/// </summary>
|
||||
public bool IsEnableInertia
|
||||
public bool IsInertiaEnabled
|
||||
{
|
||||
get => (bool) GetValue(IsEnableInertiaProperty);
|
||||
set => SetValue(IsEnableInertiaProperty, value);
|
||||
get => (bool) GetValue(IsInertiaEnabledProperty);
|
||||
set => SetValue(IsInertiaEnabledProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -50,16 +50,16 @@ namespace HandyControl.Controls
|
||||
/// <summary>
|
||||
/// 是否启用动画
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsEnableAnimationProperty = DependencyProperty.Register(
|
||||
"IsEnableAnimation", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
public static readonly DependencyProperty IsAnimationEnabledProperty = DependencyProperty.Register(
|
||||
"IsAnimationEnabled", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用动画
|
||||
/// </summary>
|
||||
public bool IsEnableAnimation
|
||||
public bool IsAnimationEnabled
|
||||
{
|
||||
get => (bool)GetValue(IsEnableAnimationProperty);
|
||||
set => SetValue(IsEnableAnimationProperty, value);
|
||||
get => (bool)GetValue(IsAnimationEnabledProperty);
|
||||
set => SetValue(IsAnimationEnabledProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -122,16 +122,16 @@ namespace HandyControl.Controls
|
||||
/// <summary>
|
||||
/// 是否将标签填充
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsEnableTabFillProperty = DependencyProperty.Register(
|
||||
"IsEnableTabFill", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
public static readonly DependencyProperty IsTabFillEnabledProperty = DependencyProperty.Register(
|
||||
"IsTabFillEnabled", typeof(bool), typeof(TabControl), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
/// <summary>
|
||||
/// 是否将标签填充
|
||||
/// </summary>
|
||||
public bool IsEnableTabFill
|
||||
public bool IsTabFillEnabled
|
||||
{
|
||||
get => (bool)GetValue(IsEnableTabFillProperty);
|
||||
set => SetValue(IsEnableTabFillProperty, value);
|
||||
get => (bool)GetValue(IsTabFillEnabledProperty);
|
||||
set => SetValue(IsTabFillEnabledProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -224,7 +224,7 @@ namespace HandyControl.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
if (!IsEnableTabFill)
|
||||
if (!IsTabFillEnabled)
|
||||
{
|
||||
_itemShowCount = (int)(ActualWidth / TabItemWidth);
|
||||
_buttonOverflow?.Show(ShowOverflowButton && Items.Count > 0 && Items.Count >= _itemShowCount);
|
||||
@@ -236,7 +236,7 @@ namespace HandyControl.Controls
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsEnableAnimation)
|
||||
if (IsAnimationEnabled)
|
||||
{
|
||||
HeaderPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
|
||||
}
|
||||
@@ -279,7 +279,7 @@ namespace HandyControl.Controls
|
||||
base.OnApplyTemplate();
|
||||
HeaderPanel = GetTemplateChild(HeaderPanelKey) as TabPanel;
|
||||
|
||||
if (IsEnableTabFill) return;
|
||||
if (IsTabFillEnabled) return;
|
||||
|
||||
_buttonOverflow = GetTemplateChild(OverflowButtonKey) as ContextMenuToggleButton;
|
||||
_scrollViewerOverflow = GetTemplateChild(OverflowScrollviewer) as ScrollViewer;
|
||||
@@ -357,7 +357,7 @@ namespace HandyControl.Controls
|
||||
{
|
||||
list.Remove(actualItem);
|
||||
list.Insert(0, actualItem);
|
||||
if (IsEnableAnimation)
|
||||
if (IsAnimationEnabled)
|
||||
{
|
||||
HeaderPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, new Duration(TimeSpan.FromMilliseconds(200)));
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ namespace HandyControl.Controls
|
||||
RaiseEvent(argsClosing);
|
||||
if (argsClosing.Cancel) return;
|
||||
|
||||
TabPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, parent.IsEnableAnimation
|
||||
TabPanel.SetCurrentValue(TabPanel.FluidMoveDurationProperty, parent.IsAnimationEnabled
|
||||
? new Duration(TimeSpan.FromMilliseconds(200))
|
||||
: new Duration(TimeSpan.FromMilliseconds(1)));
|
||||
|
||||
@@ -419,7 +419,7 @@ namespace HandyControl.Controls
|
||||
}
|
||||
|
||||
TargetOffsetX = resultX;
|
||||
if (!parent.IsEnableAnimation)
|
||||
if (!parent.IsAnimationEnabled)
|
||||
{
|
||||
AnimationCompleted();
|
||||
return;
|
||||
|
||||
@@ -40,16 +40,16 @@ namespace HandyControl.Controls
|
||||
/// <summary>
|
||||
/// 是否将标签填充
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty IsEnableTabFillProperty = DependencyProperty.Register(
|
||||
"IsEnableTabFill", typeof(bool), typeof(TabPanel), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
public static readonly DependencyProperty IsTabFillEnabledProperty = DependencyProperty.Register(
|
||||
"IsTabFillEnabled", typeof(bool), typeof(TabPanel), new PropertyMetadata(ValueBoxes.FalseBox));
|
||||
|
||||
/// <summary>
|
||||
/// 是否将标签填充
|
||||
/// </summary>
|
||||
public bool IsEnableTabFill
|
||||
public bool IsTabFillEnabled
|
||||
{
|
||||
get => (bool)GetValue(IsEnableTabFillProperty);
|
||||
set => SetValue(IsEnableTabFillProperty, value);
|
||||
get => (bool)GetValue(IsTabFillEnabledProperty);
|
||||
set => SetValue(IsTabFillEnabledProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -115,7 +115,7 @@ namespace HandyControl.Controls
|
||||
var itemWidth = .0;
|
||||
var arr = new int[count];
|
||||
|
||||
if (!IsEnableTabFill)
|
||||
if (!IsTabFillEnabled)
|
||||
{
|
||||
itemWidth = TabItemWidth;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ namespace HandyControl.Controls
|
||||
|
||||
for (var index = 0; index < count; index++)
|
||||
{
|
||||
if (IsEnableTabFill)
|
||||
if (IsTabFillEnabled)
|
||||
{
|
||||
itemWidth = arr[index];
|
||||
}
|
||||
|
||||
@@ -10,16 +10,29 @@ namespace HandyControl.Controls
|
||||
{
|
||||
public class OutlineText : FrameworkElement
|
||||
{
|
||||
private Pen _pen;
|
||||
|
||||
private FormattedText _formattedText;
|
||||
|
||||
private Geometry _textGeometry;
|
||||
|
||||
private PathGeometry _clipGeometry;
|
||||
|
||||
static OutlineText()
|
||||
{
|
||||
SnapsToDevicePixelsProperty.OverrideMetadata(typeof(OutlineText), new FrameworkPropertyMetadata(ValueBoxes.TrueBox));
|
||||
UseLayoutRoundingProperty.OverrideMetadata(typeof(OutlineText), new FrameworkPropertyMetadata(ValueBoxes.TrueBox));
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty StrokePositionProperty = DependencyProperty.Register(
|
||||
"StrokePosition", typeof(StrokePosition), typeof(OutlineText), new PropertyMetadata(default(StrokePosition)));
|
||||
|
||||
public StrokePosition StrokePosition
|
||||
{
|
||||
get => (StrokePosition) GetValue(StrokePositionProperty);
|
||||
set => SetValue(StrokePositionProperty, value);
|
||||
}
|
||||
|
||||
public static readonly DependencyProperty TextProperty = DependencyProperty.Register(
|
||||
"Text", typeof(string), typeof(OutlineText), new FrameworkPropertyMetadata(
|
||||
string.Empty,
|
||||
@@ -143,7 +156,34 @@ namespace HandyControl.Controls
|
||||
protected override void OnRender(DrawingContext drawingContext)
|
||||
{
|
||||
EnsureGeometry();
|
||||
drawingContext.DrawGeometry(Fill, new Pen(Stroke, StrokeThickness), _textGeometry);
|
||||
|
||||
drawingContext.DrawGeometry(Fill, null, _textGeometry);
|
||||
|
||||
if (StrokePosition == StrokePosition.Outside)
|
||||
{
|
||||
drawingContext.PushClip(_clipGeometry);
|
||||
}
|
||||
else if (StrokePosition == StrokePosition.Inside)
|
||||
{
|
||||
drawingContext.PushClip(_textGeometry);
|
||||
}
|
||||
|
||||
drawingContext.DrawGeometry(null, _pen, _textGeometry);
|
||||
|
||||
if (StrokePosition == StrokePosition.Outside || StrokePosition == StrokePosition.Inside)
|
||||
{
|
||||
drawingContext.Pop();
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdatePen()
|
||||
{
|
||||
_pen = new Pen(Stroke, StrokeThickness);
|
||||
|
||||
if (StrokePosition == StrokePosition.Outside || StrokePosition == StrokePosition.Inside)
|
||||
{
|
||||
_pen.Thickness = StrokeThickness * 2;
|
||||
}
|
||||
}
|
||||
|
||||
private void EnsureFormattedText()
|
||||
@@ -187,6 +227,12 @@ namespace HandyControl.Controls
|
||||
|
||||
EnsureFormattedText();
|
||||
_textGeometry = _formattedText.BuildGeometry(new Point(0, 0));
|
||||
|
||||
if (StrokePosition == StrokePosition.Outside)
|
||||
{
|
||||
var geometry = new RectangleGeometry(new Rect(0, 0, ActualWidth, ActualHeight));
|
||||
_clipGeometry = Geometry.Combine(geometry, _textGeometry, GeometryCombineMode.Exclude, null);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateFormattedText()
|
||||
@@ -237,6 +283,8 @@ namespace HandyControl.Controls
|
||||
_formattedText.MaxTextWidth = Math.Min(3579139, availableSize.Width);
|
||||
_formattedText.MaxTextHeight = Math.Max(0.0001d, availableSize.Height);
|
||||
|
||||
UpdatePen();
|
||||
|
||||
// return the desired size
|
||||
return new Size(_formattedText.Width, _formattedText.Height);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace HandyControl.Data
|
||||
{
|
||||
public enum StrokePosition
|
||||
{
|
||||
Center,
|
||||
Outside,
|
||||
Inside
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\HitMode.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ShowAnimation.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\NotifyIconInfoType.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\StrokePosition.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\TransitionMode.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\CloseWindowCommand.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<Setter Property="VerticalAlignment" Value="Top"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Offset" Value="6"/>
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
|
||||
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="controls:BorderElement.CornerRadius" Value="{StaticResource DefaultCornerRadius}"/>
|
||||
<Setter Property="Padding" Value="{StaticResource DefaultControlPadding}"/>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<RowDefinition MinHeight="{Binding Path=(controls:InfoElement.MinContentHeight),RelativeSource={RelativeSource TemplatedParent}}" Height="{Binding Path=(controls:InfoElement.ContentHeight),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Double2GridLengthConverter}}"/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<Border x:Name="border" Grid.Row="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||
@@ -105,7 +105,7 @@
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
||||
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<TextBlock Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<Border x:Name="border" Grid.Column="1" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True"/>
|
||||
@@ -157,7 +157,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Row="1"/>
|
||||
<StackPanel Grid.Row="0" Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" Margin="{TemplateBinding Padding}">
|
||||
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<TextBlock Margin="1,0,0,0" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<Border Grid.Row="1" x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
@@ -217,7 +217,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock FontSize="12" Text="{TemplateBinding ErrorStr}" Name="TextBlockError" VerticalAlignment="Bottom" Margin="9,0,0,4" Foreground="{DynamicResource DangerBrush}" Grid.Column="1"/>
|
||||
<StackPanel Grid.Column="0" Visibility="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource String2VisibilityConverter}}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Margin="0,7,6,7">
|
||||
<TextBlock Foreground="{DynamicResource PrimaryTextBrush}" Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<TextBlock Text="{Binding Path=(controls:InfoElement.Title),RelativeSource={RelativeSource TemplatedParent}}"/>
|
||||
<ContentPresenter TextElement.Foreground="{DynamicResource DangerBrush}" Margin="4,0,0,0" Content="{Binding Path=(controls:InfoElement.Symbol),RelativeSource={RelativeSource TemplatedParent}}" Visibility="{Binding Path=(controls:InfoElement.Necessary),RelativeSource={RelativeSource TemplatedParent},Converter={StaticResource Boolean2VisibilityConverter}}"/>
|
||||
</StackPanel>
|
||||
<Border Grid.Column="1" x:Name="templateRoot" CornerRadius="{Binding Path=(controls:BorderElement.CornerRadius),RelativeSource={RelativeSource TemplatedParent}}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
<Setter Property="BorderThickness" Value="1,0,1,1"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Padding" Value="16,0"/>
|
||||
<Setter Property="Padding" Value="10,0,0,0"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
|
||||
<Setter Property="Menu" Value="{StaticResource TabItemMenu}"/>
|
||||
@@ -43,28 +43,35 @@
|
||||
<ControlTemplate TargetType="controls:TabItem">
|
||||
<Grid x:Name="templateRoot" SnapsToDevicePixels="true" ContextMenu="{TemplateBinding Menu}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.ColumnSpan="2" BorderThickness="{TemplateBinding BorderThickness}" x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0">
|
||||
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="{DynamicResource RegionBrush}" Opacity="0"/>
|
||||
<Border Grid.ColumnSpan="3" BorderThickness="{TemplateBinding BorderThickness}" x:Name="mainBorder" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}" Margin="0">
|
||||
<Border Margin="0,0,0,-1" x:Name="innerBorder" Background="{DynamicResource RegionBrush}" Visibility="Collapsed"/>
|
||||
</Border>
|
||||
<ContentPresenter Grid.Column="0" x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center">
|
||||
<ContentPresenter.OpacityMask>
|
||||
<Path x:Name="PathMain" Margin="10,0,0,0" Grid.Column="0" Width="{TemplateBinding controls:IconElement.Width}" Height="{TemplateBinding controls:IconElement.Height}" Fill="{TemplateBinding Foreground}" SnapsToDevicePixels="True" Stretch="Uniform" Data="{TemplateBinding controls:IconElement.Geometry}"/>
|
||||
<ContentPresenter Grid.Column="1" x:Name="contentPresenter" ContentSource="Header" Focusable="False" HorizontalAlignment="Stretch" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
||||
<Border Name="BorderMask" Grid.Column="1" HorizontalAlignment="Right" Width="20" Background="{TemplateBinding Background}">
|
||||
<Border.OpacityMask>
|
||||
<LinearGradientBrush EndPoint="1,0" StartPoint="0,0">
|
||||
<GradientStop Offset="1"/>
|
||||
<GradientStop Color="White" Offset="0.8"/>
|
||||
<GradientStop Color="White" Offset="1"/>
|
||||
<GradientStop Offset="0"/>
|
||||
</LinearGradientBrush>
|
||||
</ContentPresenter.OpacityMask>
|
||||
</ContentPresenter>
|
||||
<Button Grid.Column="1" Focusable="False" Command="interactivity:ControlCommands.Close" Visibility="{TemplateBinding ShowCloseButton,Converter={StaticResource Boolean2VisibilityConverter}}" Background="Transparent" Style="{StaticResource ButtonCustom}" Width="28">
|
||||
</Border.OpacityMask>
|
||||
</Border>
|
||||
<Button Grid.Column="2" Focusable="False" Command="interactivity:ControlCommands.Close" Visibility="{TemplateBinding ShowCloseButton,Converter={StaticResource Boolean2VisibilityConverter}}" Background="Transparent" Style="{StaticResource ButtonCustom}" Width="28">
|
||||
<Path Fill="{DynamicResource PrimaryTextBrush}" Width="8" Height="8" Style="{StaticResource ClosePathStyle}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Panel.ZIndex" Value="1"/>
|
||||
<Setter Property="Opacity" TargetName="innerBorder" Value="1"/>
|
||||
<Setter Property="Visibility" TargetName="innerBorder" Value="Visible"/>
|
||||
<Setter Property="Background" TargetName="BorderMask" Value="{DynamicResource RegionBrush}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="controls:IconElement.Geometry" Value="{x:Null}">
|
||||
<Setter Property="Visibility" Value="Collapsed" TargetName="PathMain"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
@@ -84,7 +91,7 @@
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}">
|
||||
<controls:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsEnableTabFill="{TemplateBinding IsEnableTabFill}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
|
||||
<controls:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
|
||||
<interactivity:FluidMoveBehavior.EaseX>
|
||||
@@ -122,9 +129,9 @@
|
||||
</Border.CacheMode>
|
||||
<RepeatButton Focusable="False" Style="{StaticResource RepeatButtonIcon}" Padding="8" controls:IconElement.Geometry="{StaticResource LeftGeometry}" Foreground="{DynamicResource PrimaryTextBrush}" Background="{DynamicResource SecondaryRegionBrush}" x:Name="PART_ScrollButtonLeft"/>
|
||||
</Border>
|
||||
<controls:ScrollViewer HorizontalScrollBarVisibility="Hidden" CanMouseWheel="True" Orientation="Horizontal" IsEnableInertia="True" Grid.Row="0" Grid.Column="1" IsDeferredScrollingEnabled="True" x:Name="PART_OverflowScrollviewer">
|
||||
<controls:ScrollViewer HorizontalScrollBarVisibility="Hidden" CanMouseWheel="True" Orientation="Horizontal" IsInertiaEnabled="True" Grid.Row="0" Grid.Column="1" IsDeferredScrollingEnabled="True" x:Name="PART_OverflowScrollviewer">
|
||||
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,1" BorderBrush="{DynamicResource BorderBrush}" Name="PART_HeaderBorder">
|
||||
<controls:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsEnableTabFill="{TemplateBinding IsEnableTabFill}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
|
||||
<controls:TabPanel MinHeight="{TemplateBinding TabItemHeight}" TabItemHeight="{TemplateBinding TabItemHeight}" TabItemWidth="{TemplateBinding TabItemWidth}" IsTabFillEnabled="{TemplateBinding IsTabFillEnabled}" Margin="0,0,-1,-1" x:Name="PART_HeaderPanel" HorizontalAlignment="Left" Background="{DynamicResource SecondaryTextBrush}" IsItemsHost="true" KeyboardNavigation.TabIndex="1" Panel.ZIndex="1">
|
||||
<interactivity:Interaction.Behaviors>
|
||||
<interactivity:FluidMoveBehavior AppliesTo="Children" Duration="{Binding FluidMoveDuration,ElementName=PART_HeaderPanel}">
|
||||
<interactivity:FluidMoveBehavior.EaseX>
|
||||
@@ -164,7 +171,7 @@
|
||||
<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsScrollable" Value="True"/>
|
||||
<Condition Property="IsEnableTabFill" Value="False"/>
|
||||
<Condition Property="IsTabFillEnabled" Value="False"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Template" Value="{StaticResource TabControlPlusScrollableTemplate}"/>
|
||||
</MultiTrigger>
|
||||
@@ -335,4 +342,4 @@
|
||||
<Setter Property="controls:TitleElement.Foreground" Value="{DynamicResource TextIconBrush}"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
Reference in new issue
Block a user