Separate version

This commit is contained in:
NaBian committed 2019-01-21 11:12:38 +08:00
1 parent a2574dc955
commit db61ae9567
587 files changed
+44639 -657

No files matched your search

@@ -0,0 +1,31 @@
<controls:Window x:Class="HandyControlDemo.Window.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
mc:Ignorable="d"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
Title="{x:Static langs:Lang.About}"
ShowTitle="True"
BorderThickness="1"
BorderBrush="#262e2f"
NonClientAreaBackground="White"
NonClientAreaForeground="{StaticResource PrimaryTextBrush}"
CloseButtonForeground="{StaticResource PrimaryTextBrush}"
OtherButtonForeground="{StaticResource PrimaryTextBrush}"
OtherButtonHoverBackground="#e5e5e5"
Style="{StaticResource WindowWin10}"
ResizeMode="NoResize"
ShowInTaskbar="False"
WindowStartupLocation="CenterOwner"
Width="340"
Height="220">
<Grid>
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,30,0,0">
<TextBlock Text="HandyControl" FontSize="30" Foreground="{StaticResource PrimaryBrush}" VerticalAlignment="Top" HorizontalAlignment="Center"/>
<TextBlock Text="{Binding Version}" HorizontalAlignment="Center" Margin="0,10,0,0" Foreground="{StaticResource PrimaryBrush}"/>
</StackPanel>
<TextBlock Text="{Binding CopyRight}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,14" Foreground="{StaticResource ThirdlyTextBrush}"/>
</Grid>
</controls:Window>
@@ -0,0 +1,38 @@
using System.Diagnostics;
using System.Reflection;
using System.Windows;
namespace HandyControlDemo.Window
{
public partial class AboutWindow
{
public AboutWindow()
{
InitializeComponent();
DataContext = this;
var versionInfo = FileVersionInfo.GetVersionInfo(Assembly.GetEntryAssembly().Location);
CopyRight = versionInfo.LegalCopyright;
Version = $"v {versionInfo.FileVersion}";
}
public static readonly DependencyProperty CopyRightProperty = DependencyProperty.Register(
"CopyRight", typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
public string CopyRight
{
get => (string) GetValue(CopyRightProperty);
set => SetValue(CopyRightProperty, value);
}
public static readonly DependencyProperty VersionProperty = DependencyProperty.Register(
"Version", typeof(string), typeof(AboutWindow), new PropertyMetadata(default(string)));
public string Version
{
get => (string) GetValue(VersionProperty);
set => SetValue(VersionProperty, value);
}
}
}
@@ -0,0 +1,16 @@
<controls:BlurWindow x:Class="HandyControlDemo.Window.BlurWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
Title="{x:Static langs:Lang.Title}"
ShowTitle="True"
Style="{StaticResource WindowBlur}"
Height="450"
Width="800"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
</controls:BlurWindow>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.Window
{
public partial class BlurWindow
{
public BlurWindow()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,18 @@
<controls:Window x:Class="HandyControlDemo.Window.CommonWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
mc:Ignorable="d"
ShowTitle="True"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Style="{StaticResource WindowWin10}"
Title="{x:Static langs:Lang.Title}"
Height="450"
Width="800"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico">
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}"/>
</controls:Window>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.Window
{
public partial class CommonWindow
{
public CommonWindow()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,61 @@
<controls:Window x:Class="HandyControlDemo.Window.CustomNonClientAreaWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
mc:Ignorable="d"
OtherButtonForeground="{DynamicResource ReverseTextBrush}"
CloseButtonForeground="{DynamicResource ReverseTextBrush}"
OtherButtonHoverBackground="{DynamicResource ReverseTextBrush}"
NonClientAreaBackground="{DynamicResource ToolBarBackground}"
NonClientAreaHeight="69"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Style="{StaticResource WindowWin10}"
Title="{x:Static langs:Lang.Title}"
Height="450"
Width="800">
<controls:Window.NonClientAreaContent>
<StackPanel Orientation="Horizontal" Height="69">
<Path Data="{StaticResource LogoGeometry}" Width="40" Height="40" Stretch="Uniform" Fill="#F76B1C" Margin="20,0,0,0"></Path>
<Button Style="{StaticResource ButtonCustom}" Margin="32,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{StaticResource MenuButtonBorderBrush}">
<Path Margin="5" Fill="#ED41FF" Stretch="Uniform" Data="{StaticResource ErrorGeometry}"></Path>
</Border>
</Button>
<Button Style="{StaticResource ButtonCustom}" Margin="10,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{DynamicResource MenuButtonBorderBrush}">
<Path Margin="6" Fill="#ED41FF" Stretch="Uniform" Data="{StaticResource AskGeometry}"></Path>
</Border>
</Button>
<Button Style="{StaticResource ButtonCustom}" Margin="10,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{DynamicResource MenuButtonBorderBrush}">
<Path Margin="6" Fill="#ED41FF" Stretch="Uniform" Data="{StaticResource InfoGeometry}"></Path>
</Border>
</Button>
<Button Style="{StaticResource ButtonCustom}" Margin="32,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{DynamicResource MenuButtonBorderBrush}">
<Path Margin="5" Fill="#8EC915" Stretch="Uniform" Data="{StaticResource ErrorGeometry}"></Path>
</Border>
</Button>
<Button Style="{StaticResource ButtonCustom}" Margin="10,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{DynamicResource MenuButtonBorderBrush}">
<Path Margin="6" Fill="#8EC915" Stretch="Uniform" Data="{StaticResource AskGeometry}"></Path>
</Border>
</Button>
<Button Style="{StaticResource ButtonCustom}" Margin="10,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{DynamicResource MenuButtonBorderBrush}">
<Path Margin="6" Fill="#8EC915" Stretch="Uniform" Data="{StaticResource AllGeometry}"></Path>
</Border>
</Button>
<Button Style="{StaticResource ButtonCustom}" Margin="10,0,0,0">
<Border Width="30" Height="30" BorderThickness="1" CornerRadius="6" BorderBrush="#B7B5B7" Background="{DynamicResource MenuButtonBorderBrush}">
<Path Margin="6" Fill="#8EC915" Stretch="Uniform" Data="{StaticResource InfoGeometry}"></Path>
</Border>
</Button>
</StackPanel>
</controls:Window.NonClientAreaContent>
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}"/>
</controls:Window>
@@ -0,0 +1,10 @@
namespace HandyControlDemo.Window
{
public partial class CustomNonClientAreaWindow
{
public CustomNonClientAreaWindow()
{
InitializeComponent();
}
}
}
@@ -0,0 +1,24 @@
<controls:BlurWindow x:Class="HandyControlDemo.Window.NoNonClientAreaDragableWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
mc:Ignorable="d"
WindowStartupLocation="CenterScreen"
ShowTitle="True"
Style="{StaticResource WindowBlur}"
Icon="/HandyControlDemo;component/Resources/Img/icon.ico"
ShowNonClientArea="False"
Title="NoClientDragableWindow"
Height="450"
Width="800">
<Grid>
<Rectangle VerticalAlignment="Top" Margin="10" Height="30" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
<Border controls:WindowAttach.IsDragElement="True" VerticalAlignment="Top" Margin="11" Height="28" Background="{DynamicResource DarkDefaultBrush}" CornerRadius="4">
<TextBlock Text="{x:Static langs:Lang.DragHere}" Style="{StaticResource TextBlockDefault}"/>
</Border>
<Button Click="ButtonClose_OnClick" HorizontalAlignment="Right" Margin="0,15,15,0" VerticalAlignment="Top" Padding="0" Height="20" Width="20" Style="{StaticResource ButtonPrimary}" controls:IconElement.Geometry="{StaticResource CloseGeometry}" controls:BorderElement.CornerRadius="15"/>
</Grid>
</controls:BlurWindow>
@@ -0,0 +1,14 @@
using System.Windows;
namespace HandyControlDemo.Window
{
public partial class NoNonClientAreaDragableWindow
{
public NoNonClientAreaDragableWindow()
{
InitializeComponent();
}
private void ButtonClose_OnClick(object sender, RoutedEventArgs e) => Close();
}
}