update to v1.2.2

This commit is contained in:
NaBian committed 2018-09-18 19:22:11 +08:00
1 parent 6e01c6d7bc
commit 07762e3616
72 files changed
+907 -565

No files matched your search

+3 -2
View File
@@ -158,7 +158,8 @@ namespace HandyControl.Controls
var width = .0;
foreach (FrameworkElement item in ListBoxMain.Items)
{
width += item.Width + item.Margin.Left + item.Margin.Right;
item.Measure(new Size(double.PositiveInfinity, double.PositiveInfinity));
width += item.DesiredSize.Width;
_widthList.Add(width);
}
@@ -197,7 +198,7 @@ namespace HandyControl.Controls
else
{
var ctl = (FrameworkElement)Items[PageIndex];
var ctlWidth = ctl.Width + ctl.Margin.Left + ctl.Margin.Right;
var ctlWidth = ctl.DesiredSize.Width;
ListBoxMain.BeginAnimation(MarginProperty,
AnimationHelper.CreateAnimation(
new Thickness(-_widthList[PageIndex] + (ActualWidth - ctlWidth) / 2, 0, 0, 0)));
+11
View File
@@ -0,0 +1,11 @@
<UserControl x:Class="HandyControl.Controls.StepBar"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">
<Grid>
<ProgressBar HorizontalAlignment="Center" Name="ProgressBarBack" VerticalAlignment="Top" Margin="0,10,0,0" Style="{StaticResource ProgressBarFlat}" Background="{DynamicResource ThirdlyTextBrush}"></ProgressBar>
<UniformGrid Name="UniformGridMain" Rows="1"></UniformGrid>
</Grid>
</UserControl>
@@ -0,0 +1,98 @@
using System.Collections.Generic;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using HandyControl.Interactivity;
using HandyControl.Tools;
// ReSharper disable once CheckNamespace
namespace HandyControl.Controls
{
/// <summary>
/// Steps.xaml 的交互逻辑
/// </summary>
[ContentProperty("Items")]
public partial class StepBar
{
private bool _isLoaded;
public StepBar()
{
InitializeComponent();
Loaded += (s1, e1) =>
{
if (_isLoaded) return;
UpdateItems(Items);
CommandBindings.Add(new CommandBinding(ControlCommands.Next, (s, e) => Next()));
CommandBindings.Add(new CommandBinding(ControlCommands.Prev, (s, e) => Prev()));
_isLoaded = true;
};
}
public int StepIndex { get; private set; }
public List<StepItem> Items { get; set; } = new List<StepItem>();
private void UpdateItems(IReadOnlyCollection<StepItem> list)
{
if (list == null) return;
UniformGridMain.Children.Clear();
var index = 1;
foreach (var item in list)
{
item.Index = index;
item.IndexStr = $"{Properties.Langs.Lang.Step}{index}";
UniformGridMain.Children.Add(item);
index++;
}
}
protected override void OnRender(DrawingContext drawingContext)
{
base.OnRender(drawingContext);
var colCount = UniformGridMain.Children.Count;
if (colCount <= 0) return;
ProgressBarBack.Width = (colCount - 1) * (ActualWidth / colCount);
ProgressBarBack.Value = 0;
ProgressBarBack.Maximum = colCount - 1;
}
public void Next()
{
StepIndex++;
if (StepIndex >= UniformGridMain.Children.Count)
{
StepIndex = UniformGridMain.Children.Count - 1;
return;
}
if (UniformGridMain.Children[StepIndex - 1] is StepItem stepItemFinished)
stepItemFinished.Status = true;
if (UniformGridMain.Children[StepIndex] is StepItem stepItemSelected)
stepItemSelected.Status = false;
ProgressBarBack.BeginAnimation(RangeBase.ValueProperty, AnimationHelper.CreateAnimation(StepIndex));
}
public void Prev()
{
StepIndex--;
if (StepIndex < 0)
{
StepIndex = 0;
return;
}
if (UniformGridMain.Children[StepIndex + 1] is StepItem stepItemFinished)
stepItemFinished.Status = null;
if (UniformGridMain.Children[StepIndex] is StepItem stepItemSelected)
stepItemSelected.Status = false;
ProgressBarBack.BeginAnimation(RangeBase.ValueProperty, AnimationHelper.CreateAnimation(StepIndex));
}
}
}
+17
View File
@@ -0,0 +1,17 @@
<UserControl x:Class="HandyControl.Controls.StepItem"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Foreground="{DynamicResource ThirdlyTextBrush}"
Name="UserControlMain"
Margin="10,0">
<StackPanel>
<Border Background="White" HorizontalAlignment="Center" CornerRadius="12" BorderThickness="2" BorderBrush="{Binding Foreground,ElementName=UserControlMain}" Height="24" MinWidth="24">
<TextBlock Foreground="{Binding Foreground,ElementName=UserControlMain}" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Index,ElementName=UserControlMain}"></TextBlock>
</Border>
<TextBlock Margin="0,10,0,0" Foreground="{Binding Foreground,ElementName=UserControlMain}" Style="{StaticResource TextBlockSubTitleBold}" Text="{Binding IndexStr,ElementName=UserControlMain}"></TextBlock>
<TextBlock Foreground="{Binding Foreground,ElementName=UserControlMain}" Margin="0,4,0,0" Style="{StaticResource TextBlockDefaultThiLight}" Text="{Binding Title,ElementName=UserControlMain}"></TextBlock>
</StackPanel>
</UserControl>
@@ -0,0 +1,72 @@
using System.Windows;
using System.Windows.Media;
// ReSharper disable once CheckNamespace
namespace HandyControl.Controls
{
/// <summary>
/// StepItem.xaml 的交互逻辑
/// </summary>
public partial class StepItem
{
public StepItem()
{
InitializeComponent();
}
internal static readonly DependencyProperty IndexProperty = DependencyProperty.Register(
"Index", typeof(int), typeof(StepItem), new PropertyMetadata(-1));
internal int Index
{
get => (int)GetValue(IndexProperty);
set => SetValue(IndexProperty, value);
}
internal static readonly DependencyProperty IndexStrProperty = DependencyProperty.Register(
"IndexStr", typeof(string), typeof(StepItem), new PropertyMetadata(default(string)));
internal string IndexStr
{
get => (string) GetValue(IndexStrProperty);
set => SetValue(IndexStrProperty, value);
}
public static readonly DependencyProperty TitleProperty = DependencyProperty.Register(
"Title", typeof(string), typeof(StepItem), new PropertyMetadata(default(string)));
public string Title
{
get => (string)GetValue(TitleProperty);
set => SetValue(TitleProperty, value);
}
private bool? _status;
public bool? Status
{
get => _status;
set
{
_status = value;
UpdateStatus();
}
}
private void UpdateStatus()
{
if (Status == true)
{
Foreground = TryFindResource("PrimaryBrush") as Brush;
}
else if (Status == false)
{
Foreground = TryFindResource("PrimaryTextBrush") as Brush;
}
else
{
Foreground = TryFindResource("ThirdlyTextBrush") as Brush;
}
}
}
}
+40 -26
View File
@@ -1,9 +1,11 @@
using System;
using System.Collections;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using HandyControl.Interactivity;
using HandyControl.Tools;
// ReSharper disable once CheckNamespace
@@ -137,19 +139,26 @@ namespace HandyControl.Controls
_tabPanel = VisualParent as TabPanel;
_isLoaded = true;
};
//CommandBindings.Add(new CommandBinding(CloseOtherCommand, (s, e) =>
//{
// var enumerator = ((IEnumerable)TabControlParent.Items).GetEnumerator();
// while (enumerator.MoveNext())
// {
// var item = enumerator.Current;
// if (!Equals(item) && item != null)
// {
// TabControlParent.Items.Remove(item);
// enumerator = ((IEnumerable)TabControlParent.Items).GetEnumerator();
// }
// }
//}));
CommandBindings.Add(new CommandBinding(ControlCommands.Close, Close));
CommandBindings.Add(new CommandBinding(ControlCommands.CloseAll, (s, e) =>
{
TabControlParent.IsInternalAction = true;
TabControlParent.Items.Clear();
}));
CommandBindings.Add(new CommandBinding(ControlCommands.CloseOther, (s, e) =>
{
TabControlParent.IsInternalAction = true;
var enumerator = ((IEnumerable)TabControlParent.Items).GetEnumerator();
while (enumerator.MoveNext())
{
var item = enumerator.Current;
if (!Equals(item) && item != null)
{
TabControlParent.Items.Remove(item);
enumerator = ((IEnumerable)TabControlParent.Items).GetEnumerator();
}
}
}));
}
private TabControl TabControlParent => new Lazy<TabControl>(() => ItemsControl.ItemsControlFromItemContainer(this) as TabControl).Value;
@@ -167,22 +176,27 @@ namespace HandyControl.Controls
_buttonClose = Template.FindName(CloseButtonKey, this) as Button;
if (_buttonClose != null)
{
_buttonClose.Click += (s, e) =>
{
if (TabControlParent.IsEnableAnimation)
{
_tabPanel.ClearValue(TabPanel.FluidMoveDurationProperty);
}
else
{
_tabPanel.FluidMoveDuration = new Duration(TimeSpan.FromSeconds(0));
}
TabControlParent.IsInternalAction = true;
TabControlParent.Items.Remove(this);
};
_buttonClose.Click += Close;
}
}
/// <summary>
/// 关闭
/// </summary>
private void Close(object sender, RoutedEventArgs e)
{
if (TabControlParent.IsEnableAnimation)
{
_tabPanel.ClearValue(TabPanel.FluidMoveDurationProperty);
}
else
{
_tabPanel.FluidMoveDuration = new Duration(TimeSpan.FromSeconds(0));
}
TabControlParent.IsInternalAction = true;
TabControlParent.Items.Remove(this);
}
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
{
base.OnMouseLeftButtonDown(e);
+15
View File
@@ -65,6 +65,12 @@
<Compile Include="Controls\Pagination.xaml.cs">
<DependentUpon>Pagination.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\Steps\StepBar.xaml.cs">
<DependentUpon>StepBar.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\Steps\StepItem.xaml.cs">
<DependentUpon>StepItem.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\TabControl\TabControl.cs" />
<Compile Include="Controls\TabControl\TabItem.cs" />
<Compile Include="Controls\TabControl\TabPanel.cs" />
@@ -90,6 +96,7 @@
<Compile Include="Interactivity\Behavior!1.cs" />
<Compile Include="Interactivity\Behavior.cs" />
<Compile Include="Interactivity\BehaviorCollection.cs" />
<Compile Include="Interactivity\ControlCommands.cs" />
<Compile Include="Interactivity\DefaultTriggerAttribute.cs" />
<Compile Include="Interactivity\EventTrigger.cs" />
<Compile Include="Interactivity\EventTriggerBase!1.cs" />
@@ -176,6 +183,14 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Steps\StepBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Steps\StepItem.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\TimeBar\TimeBar.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@@ -0,0 +1,35 @@
using System.Windows.Input;
namespace HandyControl.Interactivity
{
/// <summary>
/// 控件库使用的所有命令
/// </summary>
public static class ControlCommands
{
/// <summary>
/// 关闭
/// </summary>
public static RoutedCommand Close { get; } = new RoutedCommand("Close", typeof(ControlCommands));
/// <summary>
/// 关闭所有
/// </summary>
public static RoutedCommand CloseAll { get; } = new RoutedCommand("CloseAll", typeof(ControlCommands));
/// <summary>
/// 关闭其他
/// </summary>
public static RoutedCommand CloseOther { get; } = new RoutedCommand("CloseOther", typeof(ControlCommands));
/// <summary>
/// 上一个
/// </summary>
public static RoutedCommand Prev { get; } = new RoutedCommand("Prev", typeof(ControlCommands));
/// <summary>
/// 下一个
/// </summary>
public static RoutedCommand Next { get; } = new RoutedCommand("Next", typeof(ControlCommands));
}
}
+2 -2
View File
@@ -10,5 +10,5 @@ using System.Runtime.InteropServices;
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
[assembly: AssemblyVersion("1.2.1.2")]
[assembly: AssemblyFileVersion("1.2.1.2")]
[assembly: AssemblyVersion("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]
+36
View File
@@ -78,6 +78,33 @@ namespace HandyControl.Properties.Langs {
}
}
/// <summary>
/// 查找类似 关闭 的本地化字符串。
/// </summary>
public static string Close {
get {
return ResourceManager.GetString("Close", resourceCulture);
}
}
/// <summary>
/// 查找类似 关闭所有 的本地化字符串。
/// </summary>
public static string CloseAll {
get {
return ResourceManager.GetString("CloseAll", resourceCulture);
}
}
/// <summary>
/// 查找类似 关闭其他 的本地化字符串。
/// </summary>
public static string CloseOther {
get {
return ResourceManager.GetString("CloseOther", resourceCulture);
}
}
/// <summary>
/// 查找类似 确定 的本地化字符串。
/// </summary>
@@ -177,6 +204,15 @@ namespace HandyControl.Properties.Langs {
}
}
/// <summary>
/// 查找类似 步骤 的本地化字符串。
/// </summary>
public static string Step {
get {
return ResourceManager.GetString("Step", resourceCulture);
}
}
/// <summary>
/// 查找类似 过大 的本地化字符串。
/// </summary>
@@ -165,4 +165,16 @@
<data name="Clear" xml:space="preserve">
<value>Clear</value>
</data>
<data name="Step" xml:space="preserve">
<value>Step</value>
</data>
<data name="Close" xml:space="preserve">
<value>Close</value>
</data>
<data name="CloseAll" xml:space="preserve">
<value>Close all</value>
</data>
<data name="CloseOther" xml:space="preserve">
<value>Close other</value>
</data>
</root>
+12
View File
@@ -145,4 +145,16 @@
<data name="Clear" xml:space="preserve">
<value>清空</value>
</data>
<data name="Step" xml:space="preserve">
<value>步骤</value>
</data>
<data name="Close" xml:space="preserve">
<value>关闭</value>
</data>
<data name="CloseAll" xml:space="preserve">
<value>关闭所有</value>
</data>
<data name="CloseOther" xml:space="preserve">
<value>关闭其他</value>
</data>
</root>
+8 -8
View File
@@ -2,14 +2,14 @@
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Colors.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Brushes.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Converters.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Effects.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Fonts.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Geometries.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Paths.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Sizes.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Colors.xaml"/>
<ResourceDictionary Source="../Basic/Brushes.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="../Basic/Effects.xaml"/>
<ResourceDictionary Source="../Basic/Fonts.xaml"/>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="../Basic/Paths.xaml"/>
<ResourceDictionary Source="../Basic/Sizes.xaml"/>
</ResourceDictionary.MergedDictionaries>
+21 -21
View File
@@ -2,92 +2,92 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Geometries.xaml"></ResourceDictionary>
<ResourceDictionary Source="Geometries.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="PathBaseStyle" TargetType="{x:Type Path}">
<Setter Property="Stretch" Value="Uniform"></Setter>
<Setter Property="SnapsToDevicePixels" Value="True"></Setter>
<Setter Property="Stretch" Value="Uniform"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
</Style>
<!--搜索-->
<Style x:Key="SearchPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource SearchGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource SearchGeometry}"/>
</Style>
<!--全屏返回-->
<Style x:Key="FullScreenReturnPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource FullScreenReturnGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource FullScreenReturnGeometry}"/>
</Style>
<!--全屏-->
<Style x:Key="FullScreenPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource FullScreenGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource FullScreenGeometry}"/>
</Style>
<!--windows-->
<Style x:Key="WindowsPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource WindowsGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource WindowsGeometry}"/>
</Style>
<!--保存-->
<Style x:Key="SavePathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource SaveGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource SaveGeometry}"/>
</Style>
<!--下载-->
<Style x:Key="DownloadPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource DownloadGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource DownloadGeometry}"/>
</Style>
<!--放大-->
<Style x:Key="EnlargePathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource EnlargeGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource EnlargeGeometry}"/>
</Style>
<!--缩小-->
<Style x:Key="ReducePathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource ReduceGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource ReduceGeometry}"/>
</Style>
<!--向左旋转-->
<Style x:Key="RotatePathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource RotateLeftGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource RotateLeftGeometry}"/>
</Style>
<!--日历-->
<Style x:Key="CalendarPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource CalendarGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource CalendarGeometry}"/>
</Style>
<!--删除-->
<Style x:Key="DeletePathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource DeleteGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource DeleteGeometry}"/>
</Style>
<!--关闭-->
<Style x:Key="ClosePathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource CloseGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource CloseGeometry}"/>
</Style>
<!--下-->
<Style x:Key="DownPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource DownGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource DownGeometry}"/>
</Style>
<!--时钟-->
<Style x:Key="ClockPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource ClockGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource ClockGeometry}"/>
</Style>
<!--向左-->
<Style x:Key="LeftPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource LeftGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource LeftGeometry}"/>
</Style>
<!--向右-->
<Style x:Key="RightPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="RenderTransformOrigin" Value="0.5, 0.5"></Setter>
<Setter Property="RenderTransformOrigin" Value="0.5, 0.5"/>
<Setter Property="RenderTransform">
<Setter.Value>
<TransformGroup>
@@ -98,12 +98,12 @@
</TransformGroup>
</Setter.Value>
</Setter>
<Setter Property="Data" Value="{StaticResource LeftGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource LeftGeometry}"/>
</Style>
<!--向左-->
<Style x:Key="UpDownPathStyle" BasedOn="{StaticResource PathBaseStyle}" TargetType="{x:Type Path}">
<Setter Property="Data" Value="{StaticResource UpDownGeometry}"></Setter>
<Setter Property="Data" Value="{StaticResource UpDownGeometry}"/>
</Style>
</ResourceDictionary>
@@ -2,8 +2,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BaseStyle" TargetType="{x:Type Control}">
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource TextFontSize}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource TextFontSize}"/>
</Style>
</ResourceDictionary>
@@ -2,20 +2,20 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="BaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="BaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ButtonBaseBaseStyle" BasedOn="{StaticResource BaseStyle}" TargetType="{x:Type ButtonBase}">
<Setter Property="Height" Value="{DynamicResource DefaultControlHeight}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Padding" Value="{DynamicResource DefaultControlPadding}"/>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="IsTabStop" Value="False"></Setter>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Focusable" Value="False"/>
</Style>
@@ -3,11 +3,11 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ButtonBaseBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="ButtonBaseBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="{x:Type Button}">
<Setter Property="controls:BorderElement.CornerRadius" Value="4"></Setter>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>
<Setter Property="Template">
<Setter.Value>
@@ -23,21 +23,21 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9"></Setter>
<Setter Property="Opacity" Value=".9"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value=".6"></Setter>
<Setter Property="Opacity" Value=".6"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</Style.Triggers>
</Style>
<Style x:Key="ButtonIconBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="{x:Type Button}">
<Setter Property="controls:BorderElement.CornerRadius" Value="4"></Setter>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>
<Setter Property="controls:IconElement.Angle" Value="0"></Setter>
<Setter Property="controls:IconElement.Angle" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
@@ -60,13 +60,13 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9"></Setter>
<Setter Property="Opacity" Value=".9"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value=".6"></Setter>
<Setter Property="Opacity" Value=".6"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</Style.Triggers>
</Style>
@@ -3,7 +3,7 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../../Basic/Geometries.xaml"></ResourceDictionary>
<ResourceDictionary Source="../../Basic/Geometries.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--普通菜单项-->
@@ -92,7 +92,7 @@
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
</Trigger>
<Trigger Property="IsSubmenuOpen" Value="True">
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="BorderBrush" TargetName="templateRoot" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Background" TargetName="templateRoot" Value="White"/>
<Setter Property="TextElement.Foreground" TargetName="menuHeaderContainer" Value="{DynamicResource PrimaryTextBrush}"/>
</Trigger>
@@ -209,7 +209,7 @@
<!--普通菜单-->
<Style x:Key="ContextMenuBaseStyle" TargetType="{x:Type ContextMenu}">
<Setter Property="MaxHeight" Value="199"></Setter>
<Setter Property="MaxHeight" Value="199"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ContextMenu}">
@@ -6,8 +6,8 @@
<Style x:Key="ListBoxItemBaseStyle" TargetType="{x:Type ListBoxItem}">
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Padding" Value="10,0"></Setter>
<Setter Property="Height" Value="32"></Setter>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="Height" Value="32"/>
<Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="White"/>
@@ -3,8 +3,8 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<Style x:Key="LoadingBaseStyle" TargetType="{x:Type controls:LoadingBase}">
<Setter Property="DotDiameter" Value="10"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"></Setter>
<Setter Property="DotDiameter" Value="10"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
</Style>
</ResourceDictionary>
@@ -3,17 +3,17 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="LoadingBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="LoadingBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="LoadingCircleBaseStyle" BasedOn="{StaticResource LoadingBaseStyle}" TargetType="{x:Type controls:LoadingCircle}">
<Setter Property="Width" Value="40"></Setter>
<Setter Property="Height" Value="40"></Setter>
<Setter Property="DotDiameter" Value="5"></Setter>
<Setter Property="DotInterval" Value="30"></Setter>
<Setter Property="DotOffSet" Value="60"></Setter>
<Setter Property="DotDelayTime" Value="90"></Setter>
<Setter Property="DotSpeed" Value="4"></Setter>
<Setter Property="Width" Value="40"/>
<Setter Property="Height" Value="40"/>
<Setter Property="DotDiameter" Value="5"/>
<Setter Property="DotInterval" Value="30"/>
<Setter Property="DotOffSet" Value="60"/>
<Setter Property="DotDelayTime" Value="90"/>
<Setter Property="DotSpeed" Value="4"/>
</Style>
</ResourceDictionary>
@@ -3,11 +3,11 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="LoadingBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="LoadingBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="LoadingLineBaseStyle" BasedOn="{StaticResource LoadingBaseStyle}" TargetType="{x:Type controls:LoadingLine}">
<Setter Property="DotDiameter" Value="5"></Setter>
<Setter Property="DotDiameter" Value="5"/>
</Style>
</ResourceDictionary>
@@ -58,9 +58,9 @@
<Style x:Key="ScrollBarBaseStyle" TargetType="{x:Type ScrollBar}">
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="false"/>
<Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}"></Setter>
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Focusable" Value="False"></Setter>
<Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Width" Value="8"/>
<Setter Property="MinWidth" Value="8"/>
@@ -158,9 +158,9 @@
</ControlTemplate>
<Style x:Key="ScrollViewerBaseStyle" TargetType="{x:Type controls:ScrollViewer}">
<Setter Property="VerticalScrollBarVisibility" Value="Auto"></Setter>
<Setter Property="VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="Template" Value="{StaticResource ScrollViewerBaseControlTemplate}"></Setter>
<Setter Property="Template" Value="{StaticResource ScrollViewerBaseControlTemplate}"/>
</Style>
</ResourceDictionary>
@@ -3,13 +3,13 @@
<Style x:Key="TextBlockBaseStyle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="HorizontalAlignment" Value="Center"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource TextFontSize}"></Setter>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FontSize" Value="{DynamicResource TextFontSize}"/>
</Style>
<Style x:Key="TextBlockBoldBaseStyle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontWeight" Value="Bold"></Setter>
<Setter Property="FontWeight" Value="Bold"/>
</Style>
</ResourceDictionary>
@@ -3,11 +3,11 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ButtonBaseBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="ButtonBaseBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ToggleButtonBaseStyle" BasedOn="{StaticResource ButtonBaseBaseStyle}" TargetType="{x:Type ToggleButton}">
<Setter Property="controls:BorderElement.CornerRadius" Value="4"></Setter>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>
<Setter Property="Template">
<Setter.Value>
@@ -29,13 +29,13 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9"></Setter>
<Setter Property="Opacity" Value=".9"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value=".6"></Setter>
<Setter Property="Opacity" Value=".6"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</Style.Triggers>
</Style>
@@ -141,14 +141,14 @@
</Style>
<Style x:Key="ToggleButtonIconBaseStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="Width" Value="{DynamicResource DefaultControlHeight}"/>
<Setter Property="Height" Value="{DynamicResource DefaultControlHeight}"/>
<Setter Property="Padding" Value="8"></Setter>
<Setter Property="controls:IconSwitchElement.Geometry" Value="{x:Null}"></Setter>
<Setter Property="controls:IconSwitchElement.GeometrySelected" Value="{x:Null}"></Setter>
<Setter Property="Padding" Value="8"/>
<Setter Property="controls:IconSwitchElement.Geometry" Value="{x:Null}"/>
<Setter Property="controls:IconSwitchElement.GeometrySelected" Value="{x:Null}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"></Setter>
<Setter Property="controls:BorderElement.CornerRadius" Value="4"/>
<Setter Property="BorderBrush" Value="{DynamicResource DarkMaskBrush}"/>
<Setter Property="Template">
<Setter.Value>
@@ -164,7 +164,7 @@
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(controls:IconSwitchElement.GeometrySelected)}"></Setter>
<Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(controls:IconSwitchElement.GeometrySelected)}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -172,13 +172,13 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9"></Setter>
<Setter Property="Opacity" Value=".9"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value=".6"></Setter>
<Setter Property="Opacity" Value=".6"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</Style.Triggers>
</Style>
+9 -9
View File
@@ -4,21 +4,21 @@
<!--用于包裹一个区域-->
<Style x:Key="BorderRegionStyle" TargetType="{x:Type Border}">
<Setter Property="Padding" Value="10"/>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"></Setter>
<Setter Property="BorderThickness" Value="1"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
</Style>
<Style x:Key="BorderHorizontallySplitter" TargetType="{x:Type Border}">
<Setter Property="Width" Value="1"></Setter>
<Setter Property="HorizontalAlignment" Value="Left"></Setter>
<Setter Property="Background" Value="{DynamicResource ThirdlyTextBrush}"></Setter>
<Setter Property="Width" Value="1"/>
<Setter Property="HorizontalAlignment" Value="Left"/>
<Setter Property="Background" Value="{DynamicResource ThirdlyTextBrush}"/>
</Style>
<Style x:Key="BorderVerticallySplitter" TargetType="{x:Type Border}">
<Setter Property="Height" Value="1"></Setter>
<Setter Property="VerticalAlignment" Value="Top"></Setter>
<Setter Property="Background" Value="{DynamicResource ThirdlyTextBrush}"></Setter>
<Setter Property="Height" Value="1"/>
<Setter Property="VerticalAlignment" Value="Top"/>
<Setter Property="Background" Value="{DynamicResource ThirdlyTextBrush}"/>
</Style>
</ResourceDictionary>
+10 -10
View File
@@ -3,7 +3,7 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/ButtonBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ButtonBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--Button-->
@@ -73,15 +73,15 @@
</Style>
<Style x:Key="ButtonOpacityStyle" TargetType="{x:Type Button}">
<Setter Property="Background" Value="{x:Null}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="Background" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Focusable" Value="False"></Setter>
<Setter Property="Focusable" Value="False"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
@@ -90,15 +90,15 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9"></Setter>
<Setter Property="Background" TargetName="Chrome" Value="{Binding Path=(controls:BackgroundSwitchElement.MouseHoverBackground),RelativeSource={RelativeSource TemplatedParent}}"></Setter>
<Setter Property="Opacity" Value=".9"/>
<Setter Property="Background" TargetName="Chrome" Value="{Binding Path=(controls:BackgroundSwitchElement.MouseHoverBackground),RelativeSource={RelativeSource TemplatedParent}}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value=".6"></Setter>
<Setter Property="Background" TargetName="Chrome" Value="{Binding Path=(controls:BackgroundSwitchElement.MouseDownBackground),RelativeSource={RelativeSource TemplatedParent}}"></Setter>
<Setter Property="Opacity" Value=".6"/>
<Setter Property="Background" TargetName="Chrome" Value="{Binding Path=(controls:BackgroundSwitchElement.MouseDownBackground),RelativeSource={RelativeSource TemplatedParent}}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style TargetType="{x:Type ContentControl}">
<Setter Property="Focusable" Value="False"></Setter>
<Setter Property="Focusable" Value="False"/>
</Style>
</ResourceDictionary>
+1 -1
View File
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/ContextMenuBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ContextMenuBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--默认普通菜单-->
+4 -4
View File
@@ -3,9 +3,9 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Geometries.xaml"></ResourceDictionary>
<ResourceDictionary Source="ToggleButton.xaml"></ResourceDictionary>
<ResourceDictionary Source="TextBlock.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="ToggleButton.xaml"/>
<ResourceDictionary Source="TextBlock.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Expander}">
@@ -15,7 +15,7 @@
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="MinHeight" Value="40"></Setter>
<Setter Property="MinHeight" Value="40"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Expander}">
+2 -2
View File
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/ListBoxBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ListBoxBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--默认样式-->
@@ -29,7 +29,7 @@
<Style x:Key="ListBoxItemFullStyle" BasedOn="{StaticResource ListBoxItemStyle}" TargetType="{x:Type ListBoxItem}">
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="VerticalContentAlignment" Value="Stretch"/>
<Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"></Setter>
<Setter Property="Height" Value="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/>
</Style>
<ItemsPanelTemplate x:Key="WrapPanelItemsPanelTemplate">
+13 -13
View File
@@ -3,43 +3,43 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/LoadingLineBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/LoadingCircleBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/LoadingLineBaseStyle.xaml"/>
<ResourceDictionary Source="Base/LoadingCircleBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--直线加载条默认样式-->
<Style BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="{x:Type controls:LoadingLine}"></Style>
<Style x:Key="LoadingLineLight" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="{x:Type controls:LoadingLine}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
</Style>
<Style x:Key="LoadingLineLarge" BasedOn="{StaticResource LoadingLineBaseStyle}" TargetType="{x:Type controls:LoadingLine}">
<Setter Property="DotDiameter" Value="10"></Setter>
<Setter Property="DotDiameter" Value="10"/>
</Style>
<Style x:Key="LoadingLineLargeLight" BasedOn="{StaticResource LoadingLineLarge}" TargetType="{x:Type controls:LoadingLine}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
</Style>
<!--圆形加载条默认样式-->
<Style BasedOn="{StaticResource LoadingCircleBaseStyle}" TargetType="{x:Type controls:LoadingCircle}"></Style>
<Style x:Key="LoadingCircleLight" BasedOn="{StaticResource LoadingCircleBaseStyle}" TargetType="{x:Type controls:LoadingCircle}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
</Style>
<Style x:Key="LoadingCircleLarge" BasedOn="{StaticResource LoadingCircleBaseStyle}" TargetType="{x:Type controls:LoadingCircle}">
<Setter Property="Width" Value="100"></Setter>
<Setter Property="Height" Value="100"></Setter>
<Setter Property="DotDiameter" Value="10"></Setter>
<Setter Property="DotInterval" Value="20"></Setter>
<Setter Property="DotOffSet" Value="40"></Setter>
<Setter Property="DotDelayTime" Value="120"></Setter>
<Setter Property="Width" Value="100"/>
<Setter Property="Height" Value="100"/>
<Setter Property="DotDiameter" Value="10"/>
<Setter Property="DotInterval" Value="20"/>
<Setter Property="DotOffSet" Value="40"/>
<Setter Property="DotDelayTime" Value="120"/>
</Style>
<Style x:Key="LoadingCircleLargeLight" BasedOn="{StaticResource LoadingCircleLarge}" TargetType="{x:Type controls:LoadingCircle}">
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
</Style>
</ResourceDictionary>
+12 -12
View File
@@ -3,18 +3,18 @@
<Style x:Key="PaginationButtonStyle" TargetType="{x:Type RadioButton}">
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="GroupName" Value="1"></Setter>
<Setter Property="Margin" Value="5,0"></Setter>
<Setter Property="FocusVisualStyle" Value="{x:Null}"></Setter>
<Setter Property="GroupName" Value="1"/>
<Setter Property="Margin" Value="5,0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="RenderTransformOrigin" Value=".5,.5"/>
<Setter Property="Background" Value="White"></Setter>
<Setter Property="Tag" Value="0"></Setter>
<Setter Property="Background" Value="White"/>
<Setter Property="Tag" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type RadioButton}">
@@ -38,12 +38,12 @@
</Setter>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
<Setter Property="Background" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</Style.Triggers>
</Style>
+4 -4
View File
@@ -2,7 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/ProgressBarBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ProgressBarBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style BasedOn="{StaticResource ProgressBarBaseStyle}" TargetType="{x:Type ProgressBar}">
@@ -208,9 +208,9 @@
</Style>
<Style x:Key="ProgressBarFlat" TargetType="{x:Type ProgressBar}">
<Setter Property="Height" Value="4"></Setter>
<Setter Property="Background" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"></Setter>
<Setter Property="Height" Value="4"/>
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ProgressBar}">
+1 -1
View File
@@ -3,7 +3,7 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/ScrollViewerBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ScrollViewerBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--默认样式-->
+4 -4
View File
@@ -3,8 +3,8 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Geometries.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Brushes.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="../Basic/Brushes.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="ColorPickerRepeatButton" TargetType="{x:Type RepeatButton}">
@@ -87,7 +87,7 @@
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Foreground" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="Transparent"/>
<Setter Property="Template" Value="{StaticResource ColorPickerSliderHorizontal}"/>
<Style.Triggers>
<Trigger Property="Orientation" Value="Vertical">
@@ -350,7 +350,7 @@
<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"></Setter>
<Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
<Setter Property="MinWidth" Value="30"/>
<Setter Property="MinHeight" Value="30"/>
<Setter Property="Template" Value="{StaticResource CompareSliderHorizontal}"/>
+28 -28
View File
@@ -1,34 +1,34 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Window.xaml"></ResourceDictionary>
<ResourceDictionary Source="Button.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="ToggleButton.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="TextBlock.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="CheckBox.xaml"></ResourceDictionary>-->
<!--<ResourceDictionary Source="RadioButton.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="Border.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="BulletCheckBox.xaml"></ResourceDictionary>-->
<!--<ResourceDictionary Source="Label.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="ProgressBar.xaml"></ResourceDictionary>
<ResourceDictionary Source="ScrollViewer.xaml"></ResourceDictionary>
<ResourceDictionary Source="Slider.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="Clock.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="TreeView.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="DataGrid.xaml"></ResourceDictionary>-->
<!--<ResourceDictionary Source="GroupBox.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="Pagination.xaml"></ResourceDictionary>
<ResourceDictionary Source="TabControl.xaml"></ResourceDictionary>
<ResourceDictionary Source="ListBox.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="ComboBox.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="Loading.xaml"></ResourceDictionary>
<ResourceDictionary Source="ContextMenu.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="AnimationPath.xaml"></ResourceDictionary>-->
<!--<ResourceDictionary Source="ToolTip.xaml"></ResourceDictionary>-->
<!--<ResourceDictionary Source="InfoBrief.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="Expander.xaml"></ResourceDictionary>
<!--<ResourceDictionary Source="TextBox.xaml"></ResourceDictionary>-->
<ResourceDictionary Source="ContentControl.xaml"></ResourceDictionary>
<ResourceDictionary Source="Window.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
<!--<ResourceDictionary Source="ToggleButton.xaml"/>-->
<ResourceDictionary Source="TextBlock.xaml"/>
<!--<ResourceDictionary Source="CheckBox.xaml"/>-->
<!--<ResourceDictionary Source="RadioButton.xaml"/>-->
<ResourceDictionary Source="Border.xaml"/>
<!--<ResourceDictionary Source="BulletCheckBox.xaml"/>-->
<!--<ResourceDictionary Source="Label.xaml"/>-->
<ResourceDictionary Source="ProgressBar.xaml"/>
<ResourceDictionary Source="ScrollViewer.xaml"/>
<ResourceDictionary Source="Slider.xaml"/>
<!--<ResourceDictionary Source="Clock.xaml"/>-->
<ResourceDictionary Source="TreeView.xaml"/>
<!--<ResourceDictionary Source="DataGrid.xaml"/>-->
<!--<ResourceDictionary Source="GroupBox.xaml"/>-->
<ResourceDictionary Source="Pagination.xaml"/>
<ResourceDictionary Source="TabControl.xaml"/>
<ResourceDictionary Source="ListBox.xaml"/>
<!--<ResourceDictionary Source="ComboBox.xaml"/>-->
<ResourceDictionary Source="Loading.xaml"/>
<ResourceDictionary Source="ContextMenu.xaml"/>
<!--<ResourceDictionary Source="AnimationPath.xaml"/>-->
<!--<ResourceDictionary Source="ToolTip.xaml"/>-->
<!--<ResourceDictionary Source="InfoBrief.xaml"/>-->
<ResourceDictionary Source="Expander.xaml"/>
<!--<ResourceDictionary Source="TextBox.xaml"/>-->
<ResourceDictionary Source="ContentControl.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
+13 -5
View File
@@ -1,13 +1,14 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:HandyControl.Controls"
xmlns:langs="clr-namespace:HandyControl.Properties.Langs"
xmlns:interactivity="clr-namespace:HandyControl.Interactivity">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Paths.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Converters.xaml"></ResourceDictionary>
<ResourceDictionary Source="Button.xaml"></ResourceDictionary>
<ResourceDictionary Source="ToggleButton.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Paths.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Button.xaml"/>
<ResourceDictionary Source="ToggleButton.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type controls:TabItem}">
@@ -35,6 +36,13 @@
<ColumnDefinition/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.ContextMenu>
<ContextMenu>
<MenuItem Command="interactivity:ControlCommands.Close" Header="{x:Static langs:Lang.Close}"/>
<MenuItem Command="interactivity:ControlCommands.CloseAll" Header="{x:Static langs:Lang.CloseAll}"/>
<MenuItem Command="interactivity:ControlCommands.CloseOther" Header="{x:Static langs:Lang.CloseOther}"/>
</ContextMenu>
</Grid.ContextMenu>
<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="White" Opacity="0"/>
</Border>
@@ -63,7 +71,7 @@
<Style TargetType="{x:Type controls:TabControl}">
<Setter Property="Padding" Value="0"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="BorderThickness" Value="1"/>
+15 -15
View File
@@ -2,54 +2,54 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/TextBlockBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/TextBlockBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--默认样式-->
<Style x:Key="TextBlockDefault" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}"></Style>
<Style x:Key="TextBlockDefaultAccent" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource AccentBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultPrimary" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultDanger" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource DangerBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultWarning" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource WarningBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource WarningBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultInfo" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource InfoBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource InfoBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultSuccess" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource SuccessBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultSecLight" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource SecondaryTextBrush}"/>
</Style>
<Style x:Key="TextBlockDefaultThiLight" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource ThirdlyTextBrush}"/>
</Style>
<Style x:Key="TextBlockLarge" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource LargeFontSize}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource LargeFontSize}"/>
</Style>
<Style x:Key="TextBlockTitle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource HeadFontSize}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource HeadFontSize}"/>
</Style>
<Style x:Key="TextBlockSubTitle" BasedOn="{StaticResource TextBlockBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"/>
</Style>
<Style x:Key="TextBlockLargeBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource LargeFontSize}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource LargeFontSize}"/>
</Style>
<Style x:Key="TextBlockTitleBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource HeadFontSize}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource HeadFontSize}"/>
</Style>
<Style x:Key="TextBlockSubTitleBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"></Setter>
<Setter Property="FontSize" Value="{DynamicResource SubHeadFontSize}"/>
</Style>
<Style x:Key="TextBlockDefaultBold" BasedOn="{StaticResource TextBlockBoldBaseStyle}" TargetType="{x:Type TextBlock}"></Style>
+11 -11
View File
@@ -3,8 +3,8 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Base/ToggleButtonBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ToggleButtonSwitchBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ToggleButtonBaseStyle.xaml"/>
<ResourceDictionary Source="Base/ToggleButtonSwitchBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<!--普通-->
@@ -73,7 +73,7 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(controls:IconSwitchElement.GeometrySelected)}"></Setter>
<Setter TargetName="PathIcon" Property="Data" Value="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=(controls:IconSwitchElement.GeometrySelected)}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
@@ -86,15 +86,15 @@
<!--自定义-->
<Style x:Key="ToggleButtonOpacityStyle" TargetType="{x:Type ToggleButton}">
<Setter Property="Background" Value="Transparent"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Focusable" Value="False"></Setter>
<Setter Property="Focusable" Value="False"/>
<Setter Property="IsTabStop" Value="False"/>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ToggleButton}">
@@ -106,16 +106,16 @@
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Opacity" Value=".9"></Setter>
<Setter Property="Opacity" Value=".9"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="Opacity" Value=".6"></Setter>
<Setter Property="Opacity" Value=".6"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Visibility" Value="Visible" TargetName="CheckedElement"></Setter>
<Setter Property="Visibility" Value="Visible" TargetName="CheckedElement"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" Value=".2"></Setter>
<Setter Property="Opacity" Value=".2"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
+9 -9
View File
@@ -3,9 +3,9 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="../Basic/Converters.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/BaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="Base/ScrollViewerBaseStyle.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
<ResourceDictionary Source="Base/BaseStyle.xaml"/>
<ResourceDictionary Source="Base/ScrollViewerBaseStyle.xaml"/>
</ResourceDictionary.MergedDictionaries>
<PathGeometry x:Key="TreeArrow" Figures="M508.893248 762.931659a65.039498 65.039498 0 0 1-46.420659-19.485839L97.125746 371.004022c-25.143018-25.634319-24.752868-66.816849 0.881451-91.959868 25.648769-25.164693 66.809624-24.745643 91.959867 0.881451l318.933409 325.125238 318.933408-325.125238a65.025048 65.025048 0 0 1 92.841318 91.078417L555.313907 743.44582a65.025048 65.025048 0 0 1-46.420659 19.485839z"/>
@@ -39,11 +39,11 @@
<Style TargetType="{x:Type TreeViewItem}">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Padding" Value="10,0"></Setter>
<Setter Property="Padding" Value="10,0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="BorderThickness" Value="0"></Setter>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TreeViewItem">
@@ -97,18 +97,18 @@
<Style TargetType="{x:Type TreeView}" BasedOn="{StaticResource BaseStyle}">
<Setter Property="Background" Value="{DynamicResource TextIconBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"></Setter>
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="FontSize" Value="14"></Setter>
<Setter Property="FontSize" Value="14"/>
<Setter Property="Foreground" Value="Black"/>
<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>
<Setter Property="controls:ScrollViewer.IsEnableInertia" Value="False"/>
<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"></Setter>
<Setter Property="VirtualizingPanel.IsVirtualizing" Value="True"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TreeView}">
+29 -28
View File
@@ -3,26 +3,27 @@
xmlns:controls="clr-namespace:HandyControl.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Button.xaml"></ResourceDictionary>
<ResourceDictionary Source="ToggleButton.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Geometries.xaml"></ResourceDictionary>
<ResourceDictionary Source="../Basic/Converters.xaml"></ResourceDictionary>
<ResourceDictionary Source="Button.xaml"/>
<ResourceDictionary Source="ToggleButton.xaml"/>
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
<ResourceDictionary Source="../Basic/Converters.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="WindowDefaultStyle" BasedOn="{x:Null}" TargetType="{x:Type Window}">
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="Background" Value="{DynamicResource BackgroundBrush}"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
</Style>
<Style x:Key="CustomWindowStyle" BasedOn="{x:Null}" TargetType="controls:WindowBorderless">
<Setter Property="Background" Value="White"></Setter>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"></Setter>
<Setter Property="NoUserAreaBackground" Value="{DynamicResource PrimaryBrush}"></Setter>
<Setter Property="NoUserAreaForeground" Value="White"></Setter>
<Setter Property="CloseButtonHoverBrush" Value="Red"></Setter>
<Setter Property="CloseButtonHoverForeground" Value="White"></Setter>
<Setter Property="OtherButtonHoverBrush" Value="{DynamicResource DarkPrimaryBrush}"></Setter>
<Setter Property="OtherButtonHoverForeground" Value="White"></Setter>
<Setter Property="Background" Value="White"/>
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
<Setter Property="UseLayoutRounding" Value="True"/>
<Setter Property="NoUserAreaBackground" Value="{DynamicResource PrimaryBrush}"/>
<Setter Property="NoUserAreaForeground" Value="White"/>
<Setter Property="CloseButtonHoverBrush" Value="Red"/>
<Setter Property="CloseButtonHoverForeground" Value="White"/>
<Setter Property="OtherButtonHoverBrush" Value="{DynamicResource DarkPrimaryBrush}"/>
<Setter Property="OtherButtonHoverForeground" Value="White"/>
<Setter Property="WindowChrome.WindowChrome">
<Setter.Value>
<WindowChrome CornerRadius="0" GlassFrameThickness="1" CaptionHeight="{Binding NoUserAreaHeight,RelativeSource={RelativeSource FindAncestor,AncestorType=controls:WindowBorderless}}"/>
@@ -43,10 +44,10 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<StackPanel WindowChrome.IsHitTestVisibleInChrome="True" UseLayoutRounding="True" VerticalAlignment="Top" Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal">
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="{Binding Source={x:Static SystemCommands.MinimizeWindowCommand}}" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMin" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMinGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="{Binding Source={x:Static SystemCommands.MaximizeWindowCommand}}" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMax" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMaxGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="{Binding Source={x:Static SystemCommands.RestoreWindowCommand}}" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonRestore" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding CloseButtonForeground}" Command="{Binding Source={x:Static SystemCommands.CloseWindowCommand}}" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonClose" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource CloseGeometry}" Padding="9"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MinimizeWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMin" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMinGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.MaximizeWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonMax" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource WindowMaxGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding OtherButtonForeground}" Command="SystemCommands.RestoreWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonRestore" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource WindowRestoreGeometry}" Padding="17,0"></Button>
<Button Foreground="{TemplateBinding CloseButtonForeground}" Command="SystemCommands.CloseWindowCommand" IsTabStop="False" WindowChrome.IsHitTestVisibleInChrome="True" Name="ButtonClose" Height="28" Style="{StaticResource ButtonIconTransparent}" Width="44" controls:IconElement.Geometry="{StaticResource CloseGeometry}" Padding="9"></Button>
</StackPanel>
<Grid Grid.Column="0">
<Grid.ColumnDefinitions>
@@ -68,18 +69,18 @@
<Setter Property="Opacity" Value=".8" TargetName="ContentPresenterMain"/>
</Trigger>
<Trigger Property="WindowState" Value="Maximized">
<Setter Property="Padding" Value="8"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"></Setter>
<Setter Property="Visibility" Value="Visible" TargetName="ButtonRestore"></Setter>
<Setter Property="Padding" Value="8"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
<Setter Property="Visibility" Value="Visible" TargetName="ButtonRestore"/>
</Trigger>
<Trigger Property="WindowState" Value="Normal">
<Setter Property="Visibility" Value="Visible" TargetName="ButtonMax"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"></Setter>
<Setter Property="Visibility" Value="Visible" TargetName="ButtonMax"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
</Trigger>
<Trigger Property="ResizeMode" Value="NoResize">
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMin"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMin"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonMax"/>
<Setter Property="Visibility" Value="Collapsed" TargetName="ButtonRestore"/>
</Trigger>
<Trigger Property="IsMouseOver" Value="True" SourceName="ButtonClose">
<Setter Property="Background" TargetName="ButtonClose" Value="{Binding CloseButtonHoverBrush,RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
@@ -98,10 +99,10 @@
<Setter Property="Foreground" TargetName="ButtonMin" Value="{Binding OtherButtonHoverForeground,RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
</Trigger>
<Trigger Property="ShowNoUserArea" Value="False">
<Setter Property="Visibility" Value="Collapsed" TargetName="GridMenu"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="GridMenu"/>
</Trigger>
<Trigger Property="ShowTitle" Value="False">
<Setter Property="Visibility" Value="Collapsed" TargetName="Title"></Setter>
<Setter Property="Visibility" Value="Collapsed" TargetName="Title"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
+2 -2
View File
@@ -1,8 +1,8 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Basic/Basic.xaml"></ResourceDictionary>
<ResourceDictionary Source="Styles/Style.xaml"></ResourceDictionary>
<ResourceDictionary Source="Basic/Basic.xaml"/>
<ResourceDictionary Source="Styles/Style.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>