Adjust project structure
This commit is contained in:
1 parent
d38912f5da
commit
e3c436f939
2111 files changed
+14028
-47199
No files matched your search
@@ -0,0 +1,26 @@
|
||||
<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"
|
||||
Style="{StaticResource WindowWin10}"
|
||||
ResizeMode="NoResize"
|
||||
ShowInTaskbar="False"
|
||||
WindowStartupLocation="CenterOwner"
|
||||
Width="340"
|
||||
Height="220">
|
||||
<controls:SimplePanel>
|
||||
<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}"/>
|
||||
</controls:SimplePanel>
|
||||
</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,27 @@
|
||||
<Window x:Class="HandyControlDemo.Window.GrowlDemoWindow"
|
||||
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:data="clr-namespace:HandyControlDemo.Data"
|
||||
DataContext="{Binding GrowlDemoWithToken,Source={StaticResource Locator}}"
|
||||
Title="{x:Static langs:Lang.GrowlDemo}"
|
||||
Width="800"
|
||||
Height="500">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:SimplePanel Margin="32">
|
||||
<WrapPanel>
|
||||
<Button Command="{Binding InfoCmd}" Content="{x:Static langs:Lang.Info}" Margin="0,5,5,5" Style="{StaticResource ButtonInfo}"/>
|
||||
<Button Command="{Binding SuccessCmd}" Content="{x:Static langs:Lang.Success}" Margin="5" Style="{StaticResource ButtonSuccess}"/>
|
||||
<Button Command="{Binding WarningCmd}" Content="{x:Static langs:Lang.Warning}" Margin="5" Style="{StaticResource ButtonWarning}"/>
|
||||
<Button Command="{Binding ErrorCmd}" Content="{x:Static langs:Lang.Error}" Margin="5" Style="{StaticResource ButtonDanger}"/>
|
||||
<Button Command="{Binding AskCmd}" Content="{x:Static langs:Lang.Ask}" Margin="5" Background="BlueViolet" Foreground="White"/>
|
||||
<Button Command="{Binding FatalCmd}" Content="{x:Static langs:Lang.Fatal}" Margin="5,0"/>
|
||||
<Button Command="{Binding ClearCmd}" Content="{x:Static langs:Lang.Clear}" Margin="5,0,0,0" Style="{StaticResource ButtonPrimary}"/>
|
||||
</WrapPanel>
|
||||
<controls:ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
|
||||
<StackPanel controls:Growl.Token="{x:Static data:MessageToken.GrowlDemoPanel}" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</controls:ScrollViewer>
|
||||
</controls:SimplePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</Window>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.Window
|
||||
{
|
||||
public partial class GrowlDemoWindow
|
||||
{
|
||||
public GrowlDemoWindow()
|
||||
{
|
||||
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">
|
||||
<controls:SimplePanel>
|
||||
<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"/>
|
||||
</controls:SimplePanel>
|
||||
</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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user