update to v1.2.2
This commit is contained in:
1 parent
6e01c6d7bc
commit
07762e3616
72 files changed
+907
-565
No files matched your search
@@ -1,3 +1,10 @@
|
||||
2018.09.18 Version 1.2.2
|
||||
* new controls
|
||||
- add StepBar
|
||||
|
||||
* other
|
||||
- update HandyControlDemo UI
|
||||
|
||||
2018.09.04 Version 1.2.1
|
||||
* new controls
|
||||
- add TabControl
|
||||
|
||||
@@ -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)));
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
@@ -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
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
<!--默认普通菜单-->
|
||||
|
||||
@@ -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,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">
|
||||
|
||||
@@ -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>
|
||||
@@ -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>
|
||||
|
||||
@@ -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}">
|
||||
|
||||
@@ -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>
|
||||
|
||||
<!--默认样式-->
|
||||
|
||||
@@ -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}"/>
|
||||
|
||||
@@ -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>
|
||||
@@ -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"/>
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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}">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
@@ -1,9 +1,18 @@
|
||||
namespace HandyControlDemo
|
||||
using System.Globalization;
|
||||
using System.Threading;
|
||||
using System.Windows;
|
||||
|
||||
namespace HandyControlDemo
|
||||
{
|
||||
/// <summary>
|
||||
/// App.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class App
|
||||
{
|
||||
protected override void OnStartup(StartupEventArgs e)
|
||||
{
|
||||
base.OnStartup(e);
|
||||
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,36 +1,37 @@
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
/// <summary>
|
||||
/// 包含整个程序使用的所有标识
|
||||
/// </summary>
|
||||
internal class MessageToken
|
||||
public class MessageToken
|
||||
{
|
||||
public static readonly string LoadGrowlDemoCtl = nameof(LoadGrowlDemoCtl);
|
||||
public static readonly string GrowlDemoCtl = nameof(GrowlDemoCtl);
|
||||
|
||||
public static readonly string LoadLoadingDemoCtl = nameof(LoadLoadingDemoCtl);
|
||||
public static readonly string LoadingDemoCtl = nameof(LoadingDemoCtl);
|
||||
|
||||
public static readonly string LoadImageBrowserDemoCtl = nameof(LoadImageBrowserDemoCtl);
|
||||
public static readonly string ImageBrowserDemoCtl = nameof(ImageBrowserDemoCtl);
|
||||
|
||||
public static readonly string LoadColorPickerDemoCtl = nameof(LoadColorPickerDemoCtl);
|
||||
public static readonly string ColorPickerDemoCtl = nameof(ColorPickerDemoCtl);
|
||||
|
||||
public static readonly string LoadCarouselDemoCtl = nameof(LoadCarouselDemoCtl);
|
||||
public static readonly string CarouselDemoCtl = nameof(CarouselDemoCtl);
|
||||
|
||||
public static readonly string LoadCompareSliderDemoCtl = nameof(LoadCompareSliderDemoCtl);
|
||||
public static readonly string CompareSliderDemoCtl = nameof(CompareSliderDemoCtl);
|
||||
|
||||
public static readonly string LoadTimeBarDemoCtl = nameof(LoadTimeBarDemoCtl);
|
||||
public static readonly string TimeBarDemoCtl = nameof(TimeBarDemoCtl);
|
||||
|
||||
public static readonly string LoadExpanderDemoCtl = nameof(LoadExpanderDemoCtl);
|
||||
public static readonly string PaginationDemoCtl = nameof(PaginationDemoCtl);
|
||||
|
||||
public static readonly string LoadPaginationDemoCtl = nameof(LoadPaginationDemoCtl);
|
||||
public static readonly string AnimationPathDemoCtl = nameof(AnimationPathDemoCtl);
|
||||
|
||||
public static readonly string LoadProgressBarDemoCtl = nameof(LoadProgressBarDemoCtl);
|
||||
public static readonly string StepBarDemoCtl = nameof(StepBarDemoCtl);
|
||||
|
||||
public static readonly string LoadAnimationPathDemoCtl = nameof(LoadAnimationPathDemoCtl);
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string LoadButtonDemoCtl = nameof(LoadButtonDemoCtl);
|
||||
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
|
||||
|
||||
public static readonly string LoadToggleButtonDemoCtl = nameof(LoadToggleButtonDemoCtl);
|
||||
public static readonly string ExpanderDemoCtl = nameof(ExpanderDemoCtl);
|
||||
|
||||
public static readonly string LoadTabControlDemoCtl = nameof(LoadTabControlDemoCtl);
|
||||
}
|
||||
public static readonly string ProgressBarDemoCtl = nameof(ProgressBarDemoCtl);
|
||||
|
||||
public static readonly string TabControlDemoCtl = nameof(TabControlDemoCtl);
|
||||
|
||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ output extension=".cs" #>
|
||||
<#
|
||||
var controlList = new List<string>
|
||||
{
|
||||
"GrowlDemoCtl",
|
||||
"LoadingDemoCtl",
|
||||
"ImageBrowserDemoCtl",
|
||||
"ColorPickerDemoCtl",
|
||||
"CarouselDemoCtl",
|
||||
"CompareSliderDemoCtl",
|
||||
"TimeBarDemoCtl",
|
||||
"PaginationDemoCtl",
|
||||
"AnimationPathDemoCtl",
|
||||
"StepBarDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
"ButtonDemoCtl",
|
||||
"ToggleButtonDemoCtl",
|
||||
"ExpanderDemoCtl",
|
||||
"ProgressBarDemoCtl",
|
||||
"TabControlDemoCtl"
|
||||
};
|
||||
#>
|
||||
namespace HandyControlDemo.Data
|
||||
{
|
||||
public class MessageToken
|
||||
{
|
||||
<#foreach(var item in controlList){#>
|
||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
<#foreach(var item in styleList){#>
|
||||
public static readonly string <#=item#> = nameof(<#=item#>);
|
||||
|
||||
<#}#>
|
||||
public static readonly string LoadShowContent = nameof(LoadShowContent);
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,11 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Data\MessageToken.cs" />
|
||||
<Compile Include="Data\MessageToken.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>MessageToken.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Langs\Lang.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
@@ -73,11 +77,7 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Lang.en.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\ControlLocator.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>ControlLocator.tt</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Tools\AssemblyHelper.cs" />
|
||||
<Compile Include="UserControl\Controls\AnimationPathDemoCtl.xaml.cs">
|
||||
<DependentUpon>AnimationPathDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -99,6 +99,9 @@
|
||||
<Compile Include="UserControl\Controls\LoadingDemoCtl.xaml.cs">
|
||||
<DependentUpon>LoadingDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Controls\StepBarDemoCtl.xaml.cs">
|
||||
<DependentUpon>StepBarDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UserControl\Main\NoUserContent.xaml.cs">
|
||||
<DependentUpon>NoUserContent.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -197,6 +200,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Controls\StepBarDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="UserControl\Main\NoUserContent.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -261,12 +268,9 @@
|
||||
<Resource Include="Resources\Img\b2.jpg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Window\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="UserControl\ControlLocator.tt">
|
||||
<Content Include="Data\MessageToken.tt">
|
||||
<Generator>TextTemplatingFileGenerator</Generator>
|
||||
<LastGenOutput>ControlLocator.cs</LastGenOutput>
|
||||
<LastGenOutput>MessageToken.cs</LastGenOutput>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:userControl="clr-namespace:HandyControlDemo.UserControl"
|
||||
mc:Ignorable="d"
|
||||
UseLayoutRounding="True"
|
||||
BorderThickness="1"
|
||||
BorderBrush="#262e2f"
|
||||
NoUserAreaBackground="#262e2f"
|
||||
@@ -16,15 +16,17 @@
|
||||
Name="MyWindow"
|
||||
DataContext="{Binding Main,Source={StaticResource Locator}}"
|
||||
d:DesignHeight="800"
|
||||
d:DesignWidth="1400"
|
||||
NoUserContent="{Binding NoUserContent}">
|
||||
d:DesignWidth="1400">
|
||||
<controls:WindowBorderless.NoUserContent>
|
||||
<userControl:NoUserContent/>
|
||||
</controls:WindowBorderless.NoUserContent>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="400"/>
|
||||
<ColumnDefinition MinWidth="200"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ContentPresenter Content="{Binding LeftMainContent}"/>
|
||||
<ContentPresenter Grid.Column="1" Content="{Binding MainContent}"/>
|
||||
<userControl:LeftMainContent/>
|
||||
<userControl:MainContent Grid.Column="1"/>
|
||||
<GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{StaticResource BorderBrush}"></GridSplitter>
|
||||
<controls:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
|
||||
<StackPanel IsHitTestVisible="True" VerticalAlignment="Top" Background="Transparent" Name="PanelMessage" Margin="0,10,10,10"></StackPanel>
|
||||
|
||||
@@ -12,5 +12,5 @@ using System.Windows;
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
||||
[assembly: AssemblyVersion("1.2.1.2")]
|
||||
[assembly: AssemblyFileVersion("1.2.1.2")]
|
||||
[assembly: AssemblyVersion("1.2.2.0")]
|
||||
[assembly: AssemblyFileVersion("1.2.2.0")]
|
||||
+63
@@ -69,6 +69,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 填写基本信息 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string BasicInfo {
|
||||
get {
|
||||
return ResourceManager.GetString("BasicInfo", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 按钮 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -123,6 +132,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 完成 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Complete {
|
||||
get {
|
||||
return ResourceManager.GetString("Complete", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 控件 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -249,6 +267,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下一步 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Next {
|
||||
get {
|
||||
return ResourceManager.GetString("Next", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 点击打开图片浏览器 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -267,6 +294,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 上一步 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Prev {
|
||||
get {
|
||||
return ResourceManager.GetString("Prev", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 主要 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -285,6 +321,24 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 注册 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Register {
|
||||
get {
|
||||
return ResourceManager.GetString("Register", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 步骤条 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string StepBar {
|
||||
get {
|
||||
return ResourceManager.GetString("StepBar", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 样式模板 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -348,6 +402,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 上传文件 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string UploadFile {
|
||||
get {
|
||||
return ResourceManager.GetString("UploadFile", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 警告 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -216,4 +216,25 @@
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>Title</value>
|
||||
</data>
|
||||
<data name="StepBar" xml:space="preserve">
|
||||
<value>StepBar</value>
|
||||
</data>
|
||||
<data name="Prev" xml:space="preserve">
|
||||
<value>Prev</value>
|
||||
</data>
|
||||
<data name="Next" xml:space="preserve">
|
||||
<value>Next</value>
|
||||
</data>
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>Register</value>
|
||||
</data>
|
||||
<data name="BasicInfo" xml:space="preserve">
|
||||
<value>Fill in the basic information</value>
|
||||
</data>
|
||||
<data name="UploadFile" xml:space="preserve">
|
||||
<value>Upload file </value>
|
||||
</data>
|
||||
<data name="Complete" xml:space="preserve">
|
||||
<value>Complete</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -196,4 +196,25 @@
|
||||
<data name="Title" xml:space="preserve">
|
||||
<value>标题</value>
|
||||
</data>
|
||||
<data name="StepBar" xml:space="preserve">
|
||||
<value>步骤条</value>
|
||||
</data>
|
||||
<data name="Prev" xml:space="preserve">
|
||||
<value>上一步</value>
|
||||
</data>
|
||||
<data name="Next" xml:space="preserve">
|
||||
<value>下一步</value>
|
||||
</data>
|
||||
<data name="Register" xml:space="preserve">
|
||||
<value>注册</value>
|
||||
</data>
|
||||
<data name="BasicInfo" xml:space="preserve">
|
||||
<value>填写基本信息</value>
|
||||
</data>
|
||||
<data name="UploadFile" xml:space="preserve">
|
||||
<value>上传文件</value>
|
||||
</data>
|
||||
<data name="Complete" xml:space="preserve">
|
||||
<value>完成</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace HandyControlDemo.Tools
|
||||
{
|
||||
public class AssemblyHelper
|
||||
{
|
||||
private static readonly string NameSpaceStr = typeof(AssemblyHelper).Assembly.GetName().Name;
|
||||
|
||||
public static object CreateInternalInstance(string className)
|
||||
{
|
||||
try
|
||||
{
|
||||
var type = Type.GetType($"{NameSpaceStr}.{className}");
|
||||
return type == null ? null : Activator.CreateInstance(type);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
using System;
|
||||
using CommonServiceLocator;
|
||||
using GalaSoft.MvvmLight.Ioc;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 控件定位器
|
||||
/// </summary>
|
||||
public class ControlLocator
|
||||
{
|
||||
private ControlLocator()
|
||||
{
|
||||
SimpleIoc.Default.Register<MainContent>();
|
||||
SimpleIoc.Default.Register<LeftMainContent>();
|
||||
SimpleIoc.Default.Register<NoUserContent>();
|
||||
SimpleIoc.Default.Register<GrowlDemoCtl>();
|
||||
SimpleIoc.Default.Register<LoadingDemoCtl>();
|
||||
SimpleIoc.Default.Register<ImageBrowserDemoCtl>();
|
||||
SimpleIoc.Default.Register<ColorPickerDemoCtl>();
|
||||
SimpleIoc.Default.Register<CarouselDemoCtl>();
|
||||
SimpleIoc.Default.Register<CompareSliderDemoCtl>();
|
||||
SimpleIoc.Default.Register<TimeBarDemoCtl>();
|
||||
SimpleIoc.Default.Register<PaginationDemoCtl>();
|
||||
SimpleIoc.Default.Register<AnimationPathDemoCtl>();
|
||||
SimpleIoc.Default.Register<ButtonDemoCtl>();
|
||||
SimpleIoc.Default.Register<ToggleButtonDemoCtl>();
|
||||
SimpleIoc.Default.Register<ExpanderDemoCtl>();
|
||||
SimpleIoc.Default.Register<ProgressBarDemoCtl>();
|
||||
SimpleIoc.Default.Register<TabControlDemoCtl>();
|
||||
}
|
||||
|
||||
public static ControlLocator Instance => new Lazy<ControlLocator>(() => new ControlLocator()).Value;
|
||||
|
||||
#region Main
|
||||
|
||||
public MainContent MainContent => ServiceLocator.Current.GetInstance<MainContent>();
|
||||
|
||||
public LeftMainContent LeftMainContent => ServiceLocator.Current.GetInstance<LeftMainContent>();
|
||||
|
||||
public NoUserContent NoUserContent => ServiceLocator.Current.GetInstance<NoUserContent>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Controls
|
||||
|
||||
public GrowlDemoCtl GrowlDemoCtl => new GrowlDemoCtl();
|
||||
|
||||
public LoadingDemoCtl LoadingDemoCtl => new LoadingDemoCtl();
|
||||
|
||||
public ImageBrowserDemoCtl ImageBrowserDemoCtl => new ImageBrowserDemoCtl();
|
||||
|
||||
public ColorPickerDemoCtl ColorPickerDemoCtl => new ColorPickerDemoCtl();
|
||||
|
||||
public CarouselDemoCtl CarouselDemoCtl => new CarouselDemoCtl();
|
||||
|
||||
public CompareSliderDemoCtl CompareSliderDemoCtl => new CompareSliderDemoCtl();
|
||||
|
||||
public TimeBarDemoCtl TimeBarDemoCtl => new TimeBarDemoCtl();
|
||||
|
||||
public PaginationDemoCtl PaginationDemoCtl => new PaginationDemoCtl();
|
||||
|
||||
public AnimationPathDemoCtl AnimationPathDemoCtl => new AnimationPathDemoCtl();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Styles
|
||||
|
||||
public ButtonDemoCtl ButtonDemoCtl => new ButtonDemoCtl();
|
||||
|
||||
public ToggleButtonDemoCtl ToggleButtonDemoCtl => new ToggleButtonDemoCtl();
|
||||
|
||||
public ExpanderDemoCtl ExpanderDemoCtl => new ExpanderDemoCtl();
|
||||
|
||||
public ProgressBarDemoCtl ProgressBarDemoCtl => new ProgressBarDemoCtl();
|
||||
|
||||
public TabControlDemoCtl TabControlDemoCtl => new TabControlDemoCtl();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
<#@ template debug="false" hostspecific="false" language="C#" #>
|
||||
<#@ import namespace="System.Collections.Generic"#>
|
||||
<#@ output extension=".cs" #>
|
||||
<#
|
||||
var singleList = new List<string>
|
||||
{
|
||||
"MainContent",
|
||||
"LeftMainContent",
|
||||
"NoUserContent"
|
||||
};
|
||||
var controlList = new List<string>
|
||||
{
|
||||
"GrowlDemoCtl",
|
||||
"LoadingDemoCtl",
|
||||
"ImageBrowserDemoCtl",
|
||||
"ColorPickerDemoCtl",
|
||||
"CarouselDemoCtl",
|
||||
"CompareSliderDemoCtl",
|
||||
"TimeBarDemoCtl",
|
||||
"PaginationDemoCtl",
|
||||
"AnimationPathDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
"ButtonDemoCtl",
|
||||
"ToggleButtonDemoCtl",
|
||||
"ExpanderDemoCtl",
|
||||
"ProgressBarDemoCtl",
|
||||
"TabControlDemoCtl"
|
||||
};
|
||||
#>
|
||||
using System;
|
||||
using CommonServiceLocator;
|
||||
using GalaSoft.MvvmLight.Ioc;
|
||||
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// 控件定位器
|
||||
/// </summary>
|
||||
public class ControlLocator
|
||||
{
|
||||
private ControlLocator()
|
||||
{
|
||||
<#foreach(var item in singleList){#>
|
||||
SimpleIoc.Default.Register<<#=item#>>();
|
||||
<#}#>
|
||||
<#foreach(var item in controlList){#>
|
||||
SimpleIoc.Default.Register<<#=item#>>();
|
||||
<#}#>
|
||||
<#foreach(var item in styleList){#>
|
||||
SimpleIoc.Default.Register<<#=item#>>();
|
||||
<#}#>
|
||||
}
|
||||
|
||||
public static ControlLocator Instance => new Lazy<ControlLocator>(() => new ControlLocator()).Value;
|
||||
|
||||
#region Main
|
||||
|
||||
<#foreach(var item in singleList){#>
|
||||
public <#=item#> <#=item#> => ServiceLocator.Current.GetInstance<<#=item#>>();
|
||||
|
||||
<#}#>
|
||||
#endregion
|
||||
|
||||
#region Controls
|
||||
|
||||
<#foreach(var item in controlList){#>
|
||||
public <#=item#> <#=item#> => new <#=item#>();
|
||||
|
||||
<#}#>
|
||||
#endregion
|
||||
|
||||
#region Styles
|
||||
|
||||
<#foreach(var item in styleList){#>
|
||||
public <#=item#> <#=item#> => new <#=item#>();
|
||||
|
||||
<#}#>
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:AnimationPath Margin="32" PathLength="400" Duration="0:0:4" Stretch="Uniform" Width="200" Height="200" StrokeThickness="2" Stroke="{StaticResource PrimaryBrush}" Data="M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z"></controls:AnimationPath>
|
||||
<controls:AnimationPath VerticalAlignment="Center" Margin="32" PathLength="400" Duration="0:0:4" Stretch="Uniform" Width="200" Height="200" StrokeThickness="2" Stroke="{StaticResource PrimaryBrush}" Data="M40.493382,19.001303 C36.637875,19.06448 33.938568,21.421986 33.948524,25.271919 L34.068279,71.56765 34.066906,71.598007 34.068745,71.747833 34.18895,118.21758 C34.202225,123.35083 39.026951,129.19344 44.965271,131.2674 50.903587,133.34137 55.706783,130.86133 55.693504,125.72808 L55.589508,85.524513 93.866371,85.524513 93.950943,118.21758 C93.964218,123.35083 98.788948,129.19344 104.72726,131.2674 110.66558,133.34137 115.46878,130.86133 115.4555,125.72808 L115.33575,79.432381 115.33712,79.401993 115.33528,79.252007 115.21507,32.782413 C115.2018,27.64917 110.37708,21.806566 104.43876,19.732603 98.500435,17.658638 93.697243,20.138674 93.710518,25.271919 L93.814514,65.475487 55.537647,65.475487 55.453079,32.782413 C55.439804,27.64917 50.615082,21.806566 44.676762,19.732603 43.192181,19.214111 41.778549,18.980244 40.493382,19.001303 z M9.999999,0 L140,0 C145.52284,0 150,4.4771523 150,9.999999 L150,140 C150,145.52284 145.52284,150 140,150 L9.999999,150 C4.4771523,150 0,145.52284 0,140 L0,9.999999 C0,4.4771523 4.4771523,0 9.999999,0 z"></controls:AnimationPath>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -4,7 +4,7 @@
|
||||
Background="White"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:Carousel Margin="32" AutoRun="True" Width="600" Height="330">
|
||||
<controls:Carousel Margin="32" AutoRun="True" Width="600" Height="330" VerticalAlignment="Center">
|
||||
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/1.jpg"></Image>
|
||||
<Image Width="300" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/2.jpg"></Image>
|
||||
<Grid Width="600">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
Background="White"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Orientation="Horizontal" Margin="32">
|
||||
<StackPanel Orientation="Horizontal" Margin="32" VerticalAlignment="Center">
|
||||
<controls:ColorPicker Name="ColorPicker"/>
|
||||
<Border Margin="32,0,0,0" Height="100" Width="100" BorderThickness="1" BorderBrush="{StaticResource BorderBrush}" CornerRadius="50" Background="{Binding SelectedBrush,ElementName=ColorPicker}"></Border>
|
||||
</StackPanel>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:ScrollViewer>
|
||||
<controls:ScrollViewer VerticalAlignment="Center">
|
||||
<WrapPanel ItemHeight="384" ItemWidth="632">
|
||||
<controls:CompareSlider Value="5" Width="600" Height="352">
|
||||
<controls:CompareSlider.TargetContent>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
DataContext="{Binding GrowlDemo,Source={StaticResource Locator}}"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<WrapPanel Margin="32">
|
||||
<WrapPanel Margin="32" VerticalAlignment="Center">
|
||||
<Button Command="{Binding InfoCmd}" Content="Info" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"></Button>
|
||||
<Button Command="{Binding SuccessCmd}" Content="Success" Margin="5" Style="{StaticResource ButtonSuccess}"></Button>
|
||||
<Button Command="{Binding WarningCmd}" Content="Warning" Margin="5" Style="{StaticResource ButtonWarning}"></Button>
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
DataContext="{Binding ImageBrowserDemo,Source={StaticResource Locator}}"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<Button Command="{Binding OpenImgCmd}" Content="{x:Static langs:Lang.OpenImageBrowser}" Style="{StaticResource ButtonPrimary}" Margin="32"></Button>
|
||||
<Button Command="{Binding OpenImgCmd}" Content="{x:Static langs:Lang.OpenImageBrowser}" Style="{StaticResource ButtonPrimary}" Margin="32" VerticalAlignment="Center"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -4,12 +4,12 @@
|
||||
Background="White"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Width="600" Margin="32">
|
||||
<StackPanel Width="600" Margin="32" VerticalAlignment="Center">
|
||||
<controls:LoadingLine></controls:LoadingLine>
|
||||
<controls:LoadingLine Margin="0,30" Foreground="BlueViolet" Style="{StaticResource LoadingLineLarge}"></controls:LoadingLine>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<controls:LoadingCircle></controls:LoadingCircle>
|
||||
<Border VerticalAlignment="Center" Background="{DynamicResource PrimaryBrush}" CornerRadius="10">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||
<controls:LoadingCircle/>
|
||||
<Border VerticalAlignment="Center" Margin="32,0,0,0" Background="{DynamicResource PrimaryBrush}" CornerRadius="10">
|
||||
<controls:LoadingCircle Style="{StaticResource LoadingCircleLight}" Margin="10"></controls:LoadingCircle>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
Background="White"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:Pagination Margin="32" Width="600" MaxPageCount="10"></controls:Pagination>
|
||||
<controls:Pagination Margin="32" Width="600" MaxPageCount="10" VerticalAlignment="Center"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,23 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.StepBarDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
FocusManager.FocusedElement="{Binding RelativeSource={x:Static RelativeSource.Self}, Mode=OneTime}"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center" Width="600">
|
||||
<controls:StepBar x:Name="StepBarMain">
|
||||
<controls:StepItem Title="{x:Static langs:Lang.Register}"/>
|
||||
<controls:StepItem Title="{x:Static langs:Lang.BasicInfo}"/>
|
||||
<controls:StepItem Title="{x:Static langs:Lang.UploadFile}"/>
|
||||
<controls:StepItem Title="{x:Static langs:Lang.Complete}"/>
|
||||
</controls:StepBar>
|
||||
<StackPanel Orientation="Horizontal" Margin="0,32,0,0" HorizontalAlignment="Center">
|
||||
<Button Command="interactivity:ControlCommands.Prev" CommandTarget="{Binding ElementName=StepBarMain}" Width="180" Content="{x:Static langs:Lang.Prev}" Style="{StaticResource ButtonPrimary}"></Button>
|
||||
<Button Command="interactivity:ControlCommands.Next" CommandTarget="{Binding ElementName=StepBarMain}" Width="180" Margin="16,0,0,0" Content="{x:Static langs:Lang.Next}" Style="{StaticResource ButtonPrimary}"></Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,14 @@
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
/// <summary>
|
||||
/// StepBarDemoCtl.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class StepBarDemoCtl
|
||||
{
|
||||
public StepBarDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,6 @@
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="White">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:TimeBar BorderThickness="0" Margin="32" Background="{StaticResource PrimaryBrush}" Width="600"></controls:TimeBar>
|
||||
<controls:TimeBar BorderThickness="0" Margin="32" Background="{StaticResource PrimaryBrush}" Width="600" VerticalAlignment="Center"/>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -14,22 +14,23 @@
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<TreeViewItem IsExpanded="True" Header="{x:Static langs:Lang.Styles}">
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadButtonDemoCtl}" Header="{x:Static langs:Lang.Button}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadToggleButtonDemoCtl}" Header="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadExpanderDemoCtl}" Header="{x:Static langs:Lang.Expander}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadProgressBarDemoCtl}" Header="{x:Static langs:Lang.ProgressBar}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ButtonDemoCtl}" Header="{x:Static langs:Lang.Button}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ToggleButtonDemoCtl}" Header="{x:Static langs:Lang.ToggleButton}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ExpanderDemoCtl}" Header="{x:Static langs:Lang.Expander}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ProgressBarDemoCtl}" Header="{x:Static langs:Lang.ProgressBar}"/>
|
||||
</TreeViewItem>
|
||||
<TreeViewItem IsExpanded="True" Header="{x:Static langs:Lang.Controls}">
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadGrowlDemoCtl}" Header="{x:Static langs:Lang.Growl}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadLoadingDemoCtl}" Header="{x:Static langs:Lang.Loading}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadImageBrowserDemoCtl}" Header="{x:Static langs:Lang.ImageBrowser}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadColorPickerDemoCtl}" Header="{x:Static langs:Lang.ColorPicker}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadCarouselDemoCtl}" Header="{x:Static langs:Lang.Carousel}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadCompareSliderDemoCtl}" Header="{x:Static langs:Lang.CompareSlider}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadTimeBarDemoCtl}" Header="{x:Static langs:Lang.TimeBar}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadPaginationDemoCtl}" Header="{x:Static langs:Lang.Pagination}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadAnimationPathDemoCtl}" Header="{x:Static langs:Lang.AnimationPath}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.LoadTabControlDemoCtl}" Header="{x:Static langs:Lang.TabControl}"/>
|
||||
<TreeViewItem Style="{StaticResource TreeViewItemNew}" Tag="{x:Static data:MessageToken.StepBarDemoCtl}" Header="{x:Static langs:Lang.StepBar}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.GrowlDemoCtl}" Header="{x:Static langs:Lang.Growl}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.LoadingDemoCtl}" Header="{x:Static langs:Lang.Loading}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ImageBrowserDemoCtl}" Header="{x:Static langs:Lang.ImageBrowser}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.ColorPickerDemoCtl}" Header="{x:Static langs:Lang.ColorPicker}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.CarouselDemoCtl}" Header="{x:Static langs:Lang.Carousel}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.CompareSliderDemoCtl}" Header="{x:Static langs:Lang.CompareSlider}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.TimeBarDemoCtl}" Header="{x:Static langs:Lang.TimeBar}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.PaginationDemoCtl}" Header="{x:Static langs:Lang.Pagination}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.AnimationPathDemoCtl}" Header="{x:Static langs:Lang.AnimationPath}"/>
|
||||
<TreeViewItem Tag="{x:Static data:MessageToken.TabControlDemoCtl}" Header="{x:Static langs:Lang.TabControl}"/>
|
||||
</TreeViewItem>
|
||||
</TreeView>
|
||||
</Border>
|
||||
@@ -5,7 +5,7 @@ using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
using GalaSoft.MvvmLight.Messaging;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.UserControl;
|
||||
using HandyControlDemo.Tools;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
@@ -18,79 +18,20 @@ namespace HandyControlDemo.ViewModel
|
||||
/// </summary>
|
||||
private object _contentTitle;
|
||||
|
||||
/// <summary>
|
||||
/// 左侧主内容
|
||||
/// </summary>
|
||||
private object _leftMainContent;
|
||||
|
||||
/// <summary>
|
||||
/// 主内容
|
||||
/// </summary>
|
||||
private object _mainContent;
|
||||
|
||||
/// <summary>
|
||||
/// 子内容
|
||||
/// </summary>
|
||||
private object _subContent;
|
||||
|
||||
/// <summary>
|
||||
/// 非用户区域内容
|
||||
/// </summary>
|
||||
private object _noUserContent;
|
||||
|
||||
#endregion
|
||||
|
||||
public MainViewModel()
|
||||
{
|
||||
LeftMainContent = ControlLocator.Instance.LeftMainContent;
|
||||
MainContent = ControlLocator.Instance.MainContent;
|
||||
NoUserContent = ControlLocator.Instance.NoUserContent;
|
||||
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadGrowlDemoCtl, obj => SubContent = ControlLocator.Instance.GrowlDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadLoadingDemoCtl, obj => SubContent = ControlLocator.Instance.LoadingDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadImageBrowserDemoCtl, obj => SubContent = ControlLocator.Instance.ImageBrowserDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadColorPickerDemoCtl, obj => SubContent = ControlLocator.Instance.ColorPickerDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadCarouselDemoCtl, obj => SubContent = ControlLocator.Instance.CarouselDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadCompareSliderDemoCtl, obj => SubContent = ControlLocator.Instance.CompareSliderDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadTimeBarDemoCtl, obj => SubContent = ControlLocator.Instance.TimeBarDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadPaginationDemoCtl, obj => SubContent = ControlLocator.Instance.PaginationDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadExpanderDemoCtl, obj => SubContent = ControlLocator.Instance.ExpanderDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadProgressBarDemoCtl, obj => SubContent = ControlLocator.Instance.ProgressBarDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadAnimationPathDemoCtl, obj => SubContent = ControlLocator.Instance.AnimationPathDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadButtonDemoCtl, obj => SubContent = ControlLocator.Instance.ButtonDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadToggleButtonDemoCtl, obj => SubContent = ControlLocator.Instance.ToggleButtonDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadTabControlDemoCtl, obj => SubContent = ControlLocator.Instance.TabControlDemoCtl);
|
||||
Messenger.Default.Register<object>(this, MessageToken.LoadShowContent, obj => SubContent = obj);
|
||||
}
|
||||
|
||||
#region 属性
|
||||
|
||||
/// <summary>
|
||||
/// 非用户区域内容
|
||||
/// </summary>
|
||||
public object NoUserContent
|
||||
{
|
||||
get => _noUserContent;
|
||||
set => Set(ref _noUserContent, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 左侧主内容
|
||||
/// </summary>
|
||||
public object LeftMainContent
|
||||
{
|
||||
get => _leftMainContent;
|
||||
set => Set(ref _leftMainContent, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 主内容
|
||||
/// </summary>
|
||||
public object MainContent
|
||||
{
|
||||
get => _mainContent;
|
||||
set => Set(ref _mainContent, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子内容
|
||||
/// </summary>
|
||||
@@ -134,7 +75,7 @@ namespace HandyControlDemo.ViewModel
|
||||
if (item.Tag is string tag)
|
||||
{
|
||||
ContentTitle = item.Header;
|
||||
Messenger.Default.Send<object>(null, tag);
|
||||
Messenger.Default.Send(AssemblyHelper.CreateInternalInstance($"UserControl.{tag}"), MessageToken.LoadShowContent);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -58,6 +58,10 @@
|
||||
|
||||

|
||||
|
||||
### 13、步骤条StepBar
|
||||
|
||||

|
||||
|
||||
# 使用方法
|
||||
|
||||
第一步:添加HandyControl的引用;
|
||||
@@ -93,5 +97,4 @@
|
||||
|
||||
# v1.3.0版本计划
|
||||
|
||||
1、添加时间、日历控件;
|
||||
2、添加步骤条控件;
|
||||
1、添加时间、日历控件;
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Reference in new issue
Block a user