Merge branch 'master' into add-NotifyIcon
This commit is contained in:
commit
53228907fc
76 files changed
+895
-697
No files matched your search
@@ -362,6 +362,7 @@
|
||||
<Compile Include="ViewModel\Common\ComboBoxDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\CoverViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\DialogDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\SearchBarDemoViewModel.cs" />
|
||||
<Compile Include="ViewModel\DemoViewModelBase!1.cs" />
|
||||
<Compile Include="ViewModel\Main\ContributorsViewModel.cs" />
|
||||
<Compile Include="ViewModel\Controls\GrowlDemoViewModel.cs" />
|
||||
@@ -383,6 +384,9 @@
|
||||
<Compile Include="Window\CustomNonClientAreaWindow.xaml.cs">
|
||||
<DependentUpon>CustomNonClientAreaWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Window\GrowlDemoWindow.xaml.cs">
|
||||
<DependentUpon>GrowlDemoWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Window\NoNonClientAreaDragableWindow.xaml.cs">
|
||||
<DependentUpon>NoNonClientAreaDragableWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -770,6 +774,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Window\GrowlDemoWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Window\NoNonClientAreaDragableWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<userControl:MainContent Grid.Column="1"/>
|
||||
<GridSplitter Grid.Column="1" HorizontalAlignment="Left" Width="4" Background="Transparent" BorderThickness="1,0,0,0" BorderBrush="{DynamicResource BorderBrush}"/>
|
||||
<controls:ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
|
||||
<StackPanel controls:Growl.GrowlParent="True" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
<StackPanel Name="GrowlPanel" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</controls:ScrollViewer>
|
||||
</Grid>
|
||||
</controls:BlurWindow>
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace HandyControlDemo
|
||||
using System;
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo
|
||||
{
|
||||
public partial class MainWindow
|
||||
{
|
||||
@@ -6,5 +9,19 @@
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnActivated(EventArgs e)
|
||||
{
|
||||
base.OnActivated(e);
|
||||
|
||||
Growl.SetGrowlParent(GrowlPanel, true);
|
||||
}
|
||||
|
||||
protected override void OnDeactivated(EventArgs e)
|
||||
{
|
||||
base.OnDeactivated(e);
|
||||
|
||||
Growl.SetGrowlParent(GrowlPanel, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
+18
@@ -519,6 +519,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 消息通知示例 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string GrowlDemo {
|
||||
get {
|
||||
return ResourceManager.GetString("GrowlDemo", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 连接失败,请检查网络! 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -672,6 +681,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 新建窗口 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string NewWindow {
|
||||
get {
|
||||
return ResourceManager.GetString("NewWindow", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 下一步 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -525,4 +525,10 @@
|
||||
<data name="PleaseWait" xml:space="preserve">
|
||||
<value>Please wait...</value>
|
||||
</data>
|
||||
<data name="GrowlDemo" xml:space="preserve">
|
||||
<value>Growl demo</value>
|
||||
</data>
|
||||
<data name="NewWindow" xml:space="preserve">
|
||||
<value>New window</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -525,4 +525,10 @@
|
||||
<data name="PleaseWait" xml:space="preserve">
|
||||
<value>请稍后...</value>
|
||||
</data>
|
||||
<data name="GrowlDemo" xml:space="preserve">
|
||||
<value>消息通知示例</value>
|
||||
</data>
|
||||
<data name="NewWindow" xml:space="preserve">
|
||||
<value>新建窗口</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -1,8 +1,7 @@
|
||||
<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;assembly=HandyControl"
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControl.Properties.Langs;assembly=HandyControl">
|
||||
xmlns:interactivity="clr-namespace:HandyControl.Interactivity;assembly=HandyControl">
|
||||
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="../Basic/Geometries.xaml"/>
|
||||
@@ -98,30 +97,6 @@
|
||||
<Setter Property="OtherButtonHoverForeground" Value="White"/>
|
||||
<Setter Property="NonClientAreaForeground" Value="White"/>
|
||||
<Setter Property="CloseButtonForeground" Value="White"/>
|
||||
<Setter Property="Content">
|
||||
<Setter.Value>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Path x:Name="PART_Image" HorizontalAlignment="Center" Visibility="Collapsed" Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Margin="20,32,0,0" Width="30" Height="30" Stretch="Uniform"/>
|
||||
<ScrollViewer Grid.Column="1" Grid.Row="0">
|
||||
<TextBlock Margin="10,39,10,10" x:Name="PART_Message" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||
</ScrollViewer>
|
||||
<StackPanel Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="1" Margin="0,10,0,16" Orientation="Horizontal" Background="{DynamicResource RegionBrush}" HorizontalAlignment="Center">
|
||||
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.Cancel" Content="{x:Static langs:Lang.Cancel}" Margin="5,0"/>
|
||||
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Confirm" Content="{x:Static langs:Lang.Confirm}" Margin="5,0" Background="#262e2f" Style="{StaticResource ButtonPrimary}"/>
|
||||
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsCancel="True" MinWidth="88" Command="interactivity:ControlCommands.No" Content="{x:Static langs:Lang.No}" Margin="5,0"/>
|
||||
<Button Visibility="{Binding IsEnabled,RelativeSource={RelativeSource Self},Converter={StaticResource Boolean2VisibilityConverter}}" IsDefault="True" MinWidth="88" Command="interactivity:ControlCommands.Yes" Content="{x:Static langs:Lang.Yes}" Margin="5,0" Background="#262e2f" Style="{StaticResource ButtonPrimary}"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -8,8 +8,8 @@
|
||||
Width="400"
|
||||
Height="247"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<Grid>
|
||||
<controls:SimplePanel>
|
||||
<TextBlock Style="{StaticResource TextBlockLargeBold}" Text="{x:Static langs:Lang.PleaseWait}"/>
|
||||
<Button Width="22" Height="22" Command="interactivity:ControlCommands.Close" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryBrush}" controls:IconElement.Geometry="{StaticResource ErrorGeometry}" Padding="0" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,4,4,0"/>
|
||||
</Grid>
|
||||
</controls:SimplePanel>
|
||||
</Border>
|
||||
@@ -7,10 +7,10 @@
|
||||
<controls:Carousel Margin="32" IsCenter="True" AutoRun="True" Width="600" Height="330" VerticalAlignment="Center">
|
||||
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/1.jpg"/>
|
||||
<Image Width="300" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/2.jpg"/>
|
||||
<Grid Width="600">
|
||||
<controls:SimplePanel Width="600">
|
||||
<Image Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/3.jpg"/>
|
||||
<TextBlock Text="示例文本" Style="{StaticResource TextBlockDefault}" FontSize="100" FontWeight="Bold" Foreground="White"/>
|
||||
</Grid>
|
||||
</controls:SimplePanel>
|
||||
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/4.jpg"/>
|
||||
<Image Width="600" Stretch="UniformToFill" Source="/HandyControlDemo;component/Resources/Img/5.jpg"/>
|
||||
</controls:Carousel>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<Grid Width="500" Height="400">
|
||||
<controls:SimplePanel Width="500" Height="400">
|
||||
<controls:ScrollViewer Name="ScrollViewerDemo" IsEnableInertia="True" Margin="0,10,0,0">
|
||||
<Border Height="2000" Margin="8,0">
|
||||
<Border.Background>
|
||||
@@ -16,6 +16,6 @@
|
||||
</Border>
|
||||
</controls:ScrollViewer>
|
||||
<controls:GotoTop Animated="True" AutoHiding="True" AnimationTime="500" Target="{Binding ElementName=ScrollViewerDemo}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,20"/>
|
||||
</Grid>
|
||||
</controls:SimplePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -6,14 +6,17 @@
|
||||
DataContext="{Binding GrowlDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<WrapPanel Margin="32" VerticalAlignment="Center">
|
||||
<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>
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel VerticalAlignment="Center">
|
||||
<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>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{x:Static langs:Lang.NewWindow}" Margin="0,5,0,0" HorizontalAlignment="Left"/>
|
||||
</StackPanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -3,11 +3,12 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls;assembly=HandyControl"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding SearchBarDemo,Source={StaticResource Locator}}"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<StackPanel Margin="32" Orientation="Horizontal">
|
||||
<StackPanel>
|
||||
<controls:SearchBar/>
|
||||
<controls:SearchBar Command="{Binding SearchCmd}" CommandParameter="{Binding Text,RelativeSource={RelativeSource Self}}"/>
|
||||
<controls:SearchBar Margin="0,32,0,0" IsEnabled="False"/>
|
||||
|
||||
<controls:SearchBar controls:InfoElement.Title="{x:Static langs:Lang.TitleDemoStr1}" Margin="0,32,0,0" Style="{StaticResource SearchBarExtend}"/>
|
||||
|
||||
@@ -9,25 +9,25 @@
|
||||
<Label Style="{StaticResource LabelPrimary}" Content="Default" Margin="32,32,0,0" HorizontalAlignment="Left"/>
|
||||
<controls:TabControl Margin="32,16,32,0" Width="800" Height="300">
|
||||
<controls:TabItem Header="TabItem1">
|
||||
<Grid Background="White"/>
|
||||
<controls:SimplePanel Background="White"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem2">
|
||||
<Grid Background="{DynamicResource DarkDangerBrush}"/>
|
||||
<controls:SimplePanel Background="{DynamicResource DarkDangerBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem3" IsSelected="True">
|
||||
<Grid Background="{DynamicResource PrimaryBrush}"/>
|
||||
<controls:SimplePanel Background="{DynamicResource PrimaryBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem4">
|
||||
<Grid Background="{DynamicResource DarkInfoBrush}"/>
|
||||
<controls:SimplePanel Background="{DynamicResource DarkInfoBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem5">
|
||||
<Grid Background="{DynamicResource DarkSuccessBrush}"/>
|
||||
<controls:SimplePanel Background="{DynamicResource DarkSuccessBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem6">
|
||||
<Grid Background="{DynamicResource DarkWarningBrush}"/>
|
||||
<controls:SimplePanel Background="{DynamicResource DarkWarningBrush}"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem7">
|
||||
<Grid Background="{DynamicResource DarkAccentBrush}"/>
|
||||
<controls:SimplePanel Background="{DynamicResource DarkAccentBrush}"/>
|
||||
</controls:TabItem>
|
||||
</controls:TabControl>
|
||||
<StackPanel Orientation="Horizontal" Margin="32,32,32,16">
|
||||
@@ -38,25 +38,25 @@
|
||||
</StackPanel>
|
||||
<controls:TabControl IsEnableAnimation="True" ShowCloseButton="True" IsDraggable="True" IsEnableTabFill="True" Margin="32,0,32,32" Width="800" Height="300">
|
||||
<controls:TabItem Header="TabItem1">
|
||||
<Grid Background="White"/>
|
||||
<controls:SimplePanel Background="White"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem IsSelected="True" Header="TabItem2">
|
||||
<Grid Background="#FFE8563F"/>
|
||||
<controls:SimplePanel Background="#FFE8563F"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem3">
|
||||
<Grid Background="#FF3F4EE8"/>
|
||||
<controls:SimplePanel Background="#FF3F4EE8"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem4">
|
||||
<Grid Background="#FFE83F6D"/>
|
||||
<controls:SimplePanel Background="#FFE83F6D"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem5">
|
||||
<Grid Background="#FFB23FE8"/>
|
||||
<controls:SimplePanel Background="#FFB23FE8"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem6">
|
||||
<Grid Background="#FF3FE8E8"/>
|
||||
<controls:SimplePanel Background="#FF3FE8E8"/>
|
||||
</controls:TabItem>
|
||||
<controls:TabItem Header="TabItem7">
|
||||
<Grid Background="#FFE8E03F"/>
|
||||
<controls:SimplePanel Background="#FFE8E03F"/>
|
||||
</controls:TabItem>
|
||||
</controls:TabControl>
|
||||
</StackPanel>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<controls:TransitioningContentControl>
|
||||
<Grid Margin="32">
|
||||
<controls:SimplePanel Margin="32">
|
||||
<TextBlock Text="{x:Static langs:Lang.RightClickHere}" Foreground="{DynamicResource BorderBrush}" Style="{StaticResource TextBlockTitle}"/>
|
||||
<Rectangle Width="200" Height="112" RadiusX="4" RadiusY="4" Stroke="{DynamicResource BorderBrush}" StrokeDashArray="2,2"/>
|
||||
<Border Width="200" Height="112" Background="Transparent">
|
||||
@@ -19,6 +19,6 @@
|
||||
</ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
</Border>
|
||||
</Grid>
|
||||
</controls:SimplePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -2,6 +2,7 @@
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.Window;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
@@ -44,5 +45,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public RelayCommand ClearCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(Growl.Clear)).Value;
|
||||
|
||||
public RelayCommand NewWindowCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => new GrowlDemoWindow().Show())).Value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class SearchBarDemoViewModel : ViewModelBase
|
||||
{
|
||||
public RelayCommand<string> SearchCmd => new Lazy<RelayCommand<string>>(() =>
|
||||
new RelayCommand<string>(Search)).Value;
|
||||
|
||||
private void Search(string key)
|
||||
{
|
||||
Growl.Info(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<ChatBoxViewModel>();
|
||||
SimpleIoc.Default.Register<CoverViewModel>();
|
||||
SimpleIoc.Default.Register<DialogDemoViewModel>();
|
||||
SimpleIoc.Default.Register<SearchBarDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -54,6 +55,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public DialogDemoViewModel DialogDemo => ServiceLocator.Current.GetInstance<DialogDemoViewModel>();
|
||||
|
||||
public SearchBarDemoViewModel SearchBarDemo => ServiceLocator.Current.GetInstance<SearchBarDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -10,22 +10,17 @@
|
||||
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>
|
||||
<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}"/>
|
||||
</Grid>
|
||||
</controls:SimplePanel>
|
||||
</controls:Window>
|
||||
@@ -0,0 +1,29 @@
|
||||
<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"
|
||||
DataContext="{Binding GrowlDemo,Source={StaticResource Locator}}"
|
||||
Title="{x:Static langs:Lang.GrowlDemo}"
|
||||
Width="800"
|
||||
Height="500">
|
||||
<controls:TransitioningContentControl>
|
||||
<controls:SimplePanel>
|
||||
<StackPanel Margin="32">
|
||||
<WrapPanel HorizontalAlignment="Left" VerticalAlignment="Top">
|
||||
<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>
|
||||
<Button Command="{Binding NewWindowCmd}" Content="{x:Static langs:Lang.NewWindow}" HorizontalAlignment="Left" Margin="0,5,0,0"/>
|
||||
</StackPanel>
|
||||
<controls:ScrollViewer VerticalScrollBarVisibility="Hidden" HorizontalAlignment="Right" IsEnableInertia="True" IsPenetrating="True">
|
||||
<StackPanel Name="GrowlPanel" VerticalAlignment="Top" Margin="0,10,10,10"/>
|
||||
</controls:ScrollViewer>
|
||||
</controls:SimplePanel>
|
||||
</controls:TransitioningContentControl>
|
||||
</Window>
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using HandyControl.Controls;
|
||||
|
||||
namespace HandyControlDemo.Window
|
||||
{
|
||||
public partial class GrowlDemoWindow
|
||||
{
|
||||
public GrowlDemoWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnActivated(EventArgs e)
|
||||
{
|
||||
base.OnActivated(e);
|
||||
|
||||
Growl.SetGrowlParent(GrowlPanel, true);
|
||||
}
|
||||
|
||||
protected override void OnDeactivated(EventArgs e)
|
||||
{
|
||||
base.OnDeactivated(e);
|
||||
|
||||
Growl.SetGrowlParent(GrowlPanel, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,11 +14,11 @@
|
||||
Title="NoClientDragableWindow"
|
||||
Height="450"
|
||||
Width="800">
|
||||
<Grid>
|
||||
<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"/>
|
||||
</Grid>
|
||||
</controls:SimplePanel>
|
||||
</controls:BlurWindow>
|
||||
Reference in new issue
Block a user