add BlurWindow

This commit is contained in:
NaBian committed 2018-12-25 18:24:01 +08:00
1 parent 939d776b36
commit 7a6f293011
45 files changed
+387 -110

No files matched your search

+1
View File
@@ -49,6 +49,7 @@ namespace HandyControlDemo
{
Source = new Uri("pack://application:,,,/HandyControlDemo;component/Resources/Themes/Theme.xaml")
});
Current.MainWindow?.OnApplyTemplate();
}
}
}
+2
View File
@@ -62,6 +62,8 @@
public static readonly string QQGroupView = nameof(QQGroupView);
public static readonly string BlurWindow = nameof(BlurWindow);
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
public static readonly string ToggleButtonDemoCtl = nameof(ToggleButtonDemoCtl);
+2 -1
View File
@@ -33,7 +33,8 @@ var controlList = new List<string>
"GifImageDemoCtl",
"OutlineTextDemoCtl",
"FlipClockDemoCtl",
"QQGroupView"
"QQGroupView",
"BlurWindow"
};
var styleList = new List<string>
{
+7
View File
@@ -289,6 +289,9 @@
<Compile Include="ViewModel\StepBarDemoViewModel.cs" />
<Compile Include="ViewModel\ViewModelLocator.cs" />
<Compile Include="ViewModel\WindowDemoViewModel.cs" />
<Compile Include="Window\BlurWindow.xaml.cs">
<DependentUpon>BlurWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Window\CommonWindow.xaml.cs">
<DependentUpon>CommonWindow.xaml</DependentUpon>
</Compile>
@@ -595,6 +598,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Window\BlurWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Window\CommonWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
+5 -5
View File
@@ -1,4 +1,4 @@
<controls:WindowBorderless x:Class="HandyControlDemo.MainWindow"
<controls:BlurWindow x:Class="HandyControlDemo.MainWindow"
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"
@@ -10,7 +10,7 @@
BorderBrush="#262e2f"
NonClientAreaBackground="#262e2f"
OtherButtonHoverBackground="#888580"
Style="{StaticResource CustomWindowStyle}"
Style="{StaticResource WindowBlur}"
WindowState="Maximized"
Title="MainWindow"
ResizeMode="CanResizeWithGrip"
@@ -18,9 +18,9 @@
DataContext="{Binding Main,Source={StaticResource Locator}}"
d:DesignHeight="800"
d:DesignWidth="1400">
<controls:WindowBorderless.NonClientAreaContent>
<controls:Window.NonClientAreaContent>
<userControl:NoUserContent/>
</controls:WindowBorderless.NonClientAreaContent>
</controls:Window.NonClientAreaContent>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" MinWidth="200" MaxWidth="400"/>
@@ -33,4 +33,4 @@
<StackPanel controls:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
</controls:ScrollViewer>
</Grid>
</controls:WindowBorderless>
</controls:BlurWindow>
+10 -1
View File
@@ -47,7 +47,7 @@ namespace HandyControlDemo.Properties.Langs {
}
/// <summary>
/// 使用此强类型资源类,为所有资源查找
/// 重写当前线程的 CurrentUICulture 属性
/// 重写当前线程的 CurrentUICulture 属性。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
@@ -582,6 +582,15 @@ namespace HandyControlDemo.Properties.Langs {
}
}
/// <summary>
/// 查找类似 点击打开背景模糊窗口 的本地化字符串。
/// </summary>
public static string OpenBlurWindow {
get {
return ResourceManager.GetString("OpenBlurWindow", resourceCulture);
}
}
/// <summary>
/// 查找类似 点击打开常规窗口 的本地化字符串。
/// </summary>
@@ -441,4 +441,7 @@
<data name="FlipClock" xml:space="preserve">
<value>FlipClock</value>
</data>
<data name="OpenBlurWindow" xml:space="preserve">
<value>open blur window</value>
</data>
</root>
@@ -421,4 +421,7 @@
<data name="FlipClock" xml:space="preserve">
<value>翻页时钟</value>
</data>
<data name="OpenBlurWindow" xml:space="preserve">
<value>点击打开背景模糊窗口</value>
</data>
</root>
@@ -34,7 +34,11 @@
</Setter>
</Style>
<Style x:Key="ListBoxItemNew" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
<Style x:Key="ListBoxItemTransparent" BasedOn="{StaticResource ListBoxItemBaseStyle}" TargetType="ListBoxItem">
<Setter Property="Background" Value="Transparent"/>
</Style>
<Style x:Key="ListBoxItemNew" BasedOn="{StaticResource ListBoxItemTransparent}" TargetType="ListBoxItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListBoxItem">
@@ -66,6 +70,11 @@
</Style.Triggers>
</Style>
<Style x:Key="ListBoxTransparent" BasedOn="{StaticResource ListBoxBaseStyle}" TargetType="ListBox">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="ItemContainerStyle" Value="{StaticResource ListBoxItemTransparent}"/>
</Style>
<ItemsPanelTemplate x:Key="FluidMoveBehaviorWrapPanelItemsPanelTemplate">
<WrapPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<interactivity:Interaction.Behaviors>
@@ -9,6 +9,7 @@
<controls:TransitioningContentControl>
<UniformGrid Margin="32" Columns="3" Rows="2" Height="200">
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CommonWindow}" Content="{x:Static langs:Lang.OpenCommonWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.BlurWindow}" Content="{x:Static langs:Lang.OpenBlurWindow}"/>
<Button Command="{Binding OpenWindowCmd}" CommandParameter="{x:Static data:MessageToken.CustomNonClientAreaWindow}" Content="{x:Static langs:Lang.OpenCustomNonClientAreaWindow}"/>
<Button Click="ButtonMessage_OnClick" Content="{x:Static langs:Lang.OpenMessageWindow}"/>
<Button Click="ButtonCustomContent_OnClick" Content="{x:Static langs:Lang.OpenCustomContentWindow}"/>
@@ -4,17 +4,18 @@
x:Class="HandyControlDemo.UserControl.LeftMainContent"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:data="clr-namespace:HandyControlDemo.Data"
Background="Transparent"
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}">
<TabControl SelectionChanged="TabControl_OnSelectionChanged" Style="{StaticResource TabControlInLine}" Background="Transparent" >
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectionChanged">
<command:EventToCommand Command="{Binding SwitchDemoCmd}" PassEventArgsToCommand="True" />
</i:EventTrigger>
</i:Interaction.Triggers>
<TabItem Header="{x:Static langs:Lang.Styles}">
<ListBox BorderThickness="0" SelectionMode="Single">
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Styles}">
<ListBox BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.BrushDemoCtl}" Content="{x:Static langs:Lang.Brush}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/Brush_16x.png"/>
@@ -142,8 +143,8 @@
</ListBoxItem>
</ListBox>
</TabItem>
<TabItem Header="{x:Static langs:Lang.Controls}">
<ListBox BorderThickness="0" SelectionMode="Single">
<TabItem Background="Transparent" Header="{x:Static langs:Lang.Controls}">
<ListBox BorderThickness="0" SelectionMode="Single" Style="{StaticResource ListBoxTransparent}">
<ListBoxItem Tag="{x:Static data:MessageToken.NumericUpDownDemoCtl}" Content="{x:Static langs:Lang.NumericUpDown}">
<controls:EdgeElement.LeftContent>
<Image Source="../../Resources/Img/LeftMainContent/NumericListBox_16x.png"/>
+16
View File
@@ -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();
}
}
}
+3 -3
View File
@@ -1,4 +1,4 @@
<controls:WindowBorderless x:Class="HandyControlDemo.Window.CommonWindow"
<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"
@@ -9,10 +9,10 @@
ShowTitle="True"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Style="{StaticResource CustomWindowStyle}"
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:WindowBorderless>
</controls:Window>
@@ -1,4 +1,4 @@
<controls:WindowBorderless x:Class="HandyControlDemo.Window.CustomNonClientAreaWindow"
<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"
@@ -13,11 +13,11 @@
NonClientAreaHeight="69"
Background="{DynamicResource MainContentBackgroundBrush}"
WindowStartupLocation="CenterScreen"
Style="{StaticResource CustomWindowStyle}"
Style="{StaticResource WindowWin10}"
Title="{x:Static langs:Lang.Title}"
Height="450"
Width="800">
<controls:WindowBorderless.NonClientAreaContent>
<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">
@@ -56,6 +56,6 @@
</Border>
</Button>
</StackPanel>
</controls:WindowBorderless.NonClientAreaContent>
</controls:Window.NonClientAreaContent>
<Border Background="{DynamicResource MainContentForegroundDrawingBrush}"/>
</controls:WindowBorderless>
</controls:Window>