add Notification
This commit is contained in:
1 parent
436f5d076b
commit
a4e80e288d
30 files changed
+440
-78
No files matched your search
@@ -6,6 +6,7 @@
|
||||
xmlns:d1P1="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:data="clr-namespace:HandyControlDemo.Data"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
d1P1:Ignorable="d"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
@@ -35,6 +36,12 @@
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
|
||||
<ObjectDataProvider x:Key="ShowAnimations" MethodName="GetValues" ObjectType="sys:Enum">
|
||||
<ObjectDataProvider.MethodParameters>
|
||||
<x:Type TypeName="hc:ShowAnimation"/>
|
||||
</ObjectDataProvider.MethodParameters>
|
||||
</ObjectDataProvider>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
</Application.Resources>
|
||||
|
||||
@@ -112,6 +112,8 @@
|
||||
|
||||
public static readonly string SpriteDemoCtl = nameof(SpriteDemoCtl);
|
||||
|
||||
public static readonly string NotificationDemoCtl = nameof(NotificationDemoCtl);
|
||||
|
||||
public static readonly string ButtonDemoCtl = nameof(ButtonDemoCtl);
|
||||
|
||||
public static readonly string RepeatButtonDemoCtl = nameof(RepeatButtonDemoCtl);
|
||||
|
||||
@@ -58,7 +58,8 @@ var controlList = new List<string>
|
||||
"ImageBlockDemoCtl",
|
||||
"RunningBlockDemoCtl",
|
||||
"HoneycombPanelDemoCtl",
|
||||
"SpriteDemoCtl"
|
||||
"SpriteDemoCtl",
|
||||
"NotificationDemoCtl"
|
||||
};
|
||||
var styleList = new List<string>
|
||||
{
|
||||
|
||||
@@ -63,6 +63,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\MagnifierDemoCtl.xaml.cs">
|
||||
<DependentUpon>MagnifierDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\NotificationDemoCtl.xaml.cs">
|
||||
<DependentUpon>NotificationDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml.cs">
|
||||
<DependentUpon>RangeSliderDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -207,6 +210,9 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Controls\WindowDemoCtl.xaml.cs">
|
||||
<DependentUpon>WindowDemoCtl.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\AppNotification.xaml.cs">
|
||||
<DependentUpon>AppNotification.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)UserControl\Main\BlogsView.xaml.cs">
|
||||
<DependentUpon>BlogsView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -324,6 +330,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\DialogDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\GrowlDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\ImageBrowserDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\NotificationDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\NotifyIconDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\PaginationDemoViewModel.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)ViewModel\Controls\SearchBarDemoViewModel.cs" />
|
||||
@@ -451,6 +458,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\NotificationDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Controls\RangeSliderDemoCtl.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -643,6 +654,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\AppNotification.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)UserControl\Main\BlogsView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -852,6 +852,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 桌面通知 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string Notification {
|
||||
get {
|
||||
return ResourceManager.GetString("Notification", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 托盘图标 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1320,6 +1329,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 发送通知 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string SendNotification {
|
||||
get {
|
||||
return ResourceManager.GetString("SendNotification", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 徽章 的本地化字符串。
|
||||
/// </summary>
|
||||
@@ -1383,6 +1401,15 @@ namespace HandyControlDemo.Properties.Langs {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 保持打开 的本地化字符串。
|
||||
/// </summary>
|
||||
public static string StaysOpen {
|
||||
get {
|
||||
return ResourceManager.GetString("StaysOpen", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 步骤 的本地化字符串。
|
||||
/// </summary>
|
||||
|
||||
@@ -651,4 +651,13 @@
|
||||
<data name="OpenSprite" xml:space="preserve">
|
||||
<value>Open sprite</value>
|
||||
</data>
|
||||
<data name="Notification" xml:space="preserve">
|
||||
<value>Notification</value>
|
||||
</data>
|
||||
<data name="SendNotification" xml:space="preserve">
|
||||
<value>Send notification</value>
|
||||
</data>
|
||||
<data name="StaysOpen" xml:space="preserve">
|
||||
<value>Stays open</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -651,4 +651,13 @@
|
||||
<data name="OpenSprite" xml:space="preserve">
|
||||
<value>打开精灵</value>
|
||||
</data>
|
||||
<data name="Notification" xml:space="preserve">
|
||||
<value>桌面通知</value>
|
||||
</data>
|
||||
<data name="SendNotification" xml:space="preserve">
|
||||
<value>发送通知</value>
|
||||
</data>
|
||||
<data name="StaysOpen" xml:space="preserve">
|
||||
<value>保持打开</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 181 B |
@@ -0,0 +1,18 @@
|
||||
<UserControl x:Class="HandyControlDemo.UserControl.NotificationDemoCtl"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
xmlns:langs="clr-namespace:HandyControlDemo.Properties.Langs"
|
||||
DataContext="{Binding NotificationDemo,Source={StaticResource Locator}}"
|
||||
Width="300"
|
||||
Background="{DynamicResource RegionBrush}">
|
||||
<hc:TransitioningContentControl>
|
||||
<StackPanel Margin="32" VerticalAlignment="Center">
|
||||
<ComboBox SelectedValue="{Binding ShowAnimation}" ItemsSource="{Binding Source={StaticResource ShowAnimations}}"/>
|
||||
<hc:ButtonGroup Margin="0,16,0,0">
|
||||
<ToggleButton Content="{x:Static langs:Lang.StaysOpen}" IsChecked="{Binding StaysOpen}"/>
|
||||
<Button Command="{Binding OpenCmd}" Content="{x:Static langs:Lang.SendNotification}"/>
|
||||
</hc:ButtonGroup>
|
||||
</StackPanel>
|
||||
</hc:TransitioningContentControl>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class NotificationDemoCtl
|
||||
{
|
||||
public NotificationDemoCtl()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<Border x:Class="HandyControlDemo.UserControl.AppNotification"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:hc="https://handyorg.github.io/handycontrol"
|
||||
Background="White"
|
||||
Width="320"
|
||||
Height="518">
|
||||
<hc:SimplePanel>
|
||||
<Path Margin="0,36,0,0" VerticalAlignment="Top" Width="70" Height="70" Data="{StaticResource LogoGeometry}" Fill="#f06632"/>
|
||||
<TextBlock Text="HandyControl" FontSize="30" Foreground="{StaticResource PrimaryBrush}" HorizontalAlignment="Center" Margin="0,122,0,0" VerticalAlignment="Top"/>
|
||||
<Button Command="hc:ControlCommands.CloseWindow" CommandParameter="{Binding RelativeSource={RelativeSource Self}}" Content="{x:Static hc:Lang.Close}" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="10,0,10,10"/>
|
||||
</hc:SimplePanel>
|
||||
</Border>
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControlDemo.UserControl
|
||||
{
|
||||
public partial class AppNotification
|
||||
{
|
||||
public AppNotification()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,7 +200,7 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/ImageStack_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}">
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.MagnifierDemoCtl}" Content="{x:Static langs:Lang.Magnifier}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Search_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
@@ -450,6 +450,11 @@
|
||||
<Image Source="../../Resources/Img/LeftMainContent/HandyControl.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Style="{StaticResource ListBoxItemNew}" Tag="{x:Static data:MessageToken.NotificationDemoCtl}" Content="{x:Static langs:Lang.Notification}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Procedure_16x.png"/>
|
||||
</hc:EdgeElement.LeftContent>
|
||||
</ListBoxItem>
|
||||
<ListBoxItem Tag="{x:Static data:MessageToken.DialogDemoCtl}" Content="{x:Static langs:Lang.Dialog}">
|
||||
<hc:EdgeElement.LeftContent>
|
||||
<Image Source="../../Resources/Img/LeftMainContent/Dialog_16x.png"/>
|
||||
|
||||
@@ -7,7 +7,7 @@ using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
using HandyControl.Tools.Extension;
|
||||
|
||||
namespace HandyControlDemo.ViewModel.Basic
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class InteractiveDialogViewModel : ViewModelBase, IDialogResultable<string>
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ using GalaSoft.MvvmLight.Command;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
#endif
|
||||
|
||||
namespace HandyControlDemo.ViewModel.Controls
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class BadgeDemoViewModel : ViewModelBase
|
||||
{
|
||||
|
||||
@@ -11,7 +11,6 @@ using HandyControl.Controls;
|
||||
using HandyControl.Tools.Extension;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.UserControl;
|
||||
using HandyControlDemo.ViewModel.Basic;
|
||||
using HandyControlDemo.Window;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
#if netle40
|
||||
using GalaSoft.MvvmLight.Command;
|
||||
#else
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControl.Controls;
|
||||
using HandyControl.Data;
|
||||
using HandyControlDemo.UserControl;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class NotificationDemoViewModel : ViewModelBase
|
||||
{
|
||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(() => Notification.Show(new AppNotification(), ShowAnimation, StaysOpen))).Value;
|
||||
|
||||
private ShowAnimation _showAnimation;
|
||||
|
||||
public ShowAnimation ShowAnimation
|
||||
{
|
||||
get => _showAnimation;
|
||||
set => Set(ref _showAnimation, value);
|
||||
}
|
||||
|
||||
private bool _staysOpen = true;
|
||||
|
||||
public bool StaysOpen
|
||||
{
|
||||
get => _staysOpen;
|
||||
set => Set(ref _staysOpen, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using GalaSoft.MvvmLight;
|
||||
using HandyControl.Controls;
|
||||
using HandyControlDemo.UserControl;
|
||||
#if netle40
|
||||
@@ -8,9 +7,9 @@ using GalaSoft.MvvmLight.Command;
|
||||
using GalaSoft.MvvmLight.CommandWpf;
|
||||
# endif
|
||||
|
||||
namespace HandyControlDemo
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
public class SpriteDemoViewModel : ViewModelBase
|
||||
public class SpriteDemoViewModel
|
||||
{
|
||||
public RelayCommand OpenCmd => new Lazy<RelayCommand>(() =>
|
||||
new RelayCommand(()=> Sprite.Show(new AppSprite()))).Value;
|
||||
|
||||
@@ -4,8 +4,6 @@ using CommonServiceLocator;
|
||||
using GalaSoft.MvvmLight.Ioc;
|
||||
using HandyControlDemo.Data;
|
||||
using HandyControlDemo.Service;
|
||||
using HandyControlDemo.ViewModel.Basic;
|
||||
using HandyControlDemo.ViewModel.Controls;
|
||||
|
||||
namespace HandyControlDemo.ViewModel
|
||||
{
|
||||
@@ -40,6 +38,7 @@ namespace HandyControlDemo.ViewModel
|
||||
SimpleIoc.Default.Register<NoUserViewModel>();
|
||||
SimpleIoc.Default.Register<CardDemoViewModel>();
|
||||
SimpleIoc.Default.Register<SpriteDemoViewModel>();
|
||||
SimpleIoc.Default.Register<NotificationDemoViewModel>();
|
||||
}
|
||||
|
||||
public static ViewModelLocator Instance => new Lazy<ViewModelLocator>(() =>
|
||||
@@ -93,6 +92,8 @@ namespace HandyControlDemo.ViewModel
|
||||
|
||||
public SpriteDemoViewModel SpriteDemo => ServiceLocator.Current.GetInstance<SpriteDemoViewModel>();
|
||||
|
||||
public NotificationDemoViewModel NotificationDemo => ServiceLocator.Current.GetInstance<NotificationDemoViewModel>();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Threading;
|
||||
using HandyControl.Data;
|
||||
using HandyControl.Tools;
|
||||
|
||||
namespace HandyControl.Controls
|
||||
{
|
||||
public sealed class Notification : System.Windows.Window
|
||||
{
|
||||
private const int WaitTime = 6;
|
||||
|
||||
/// <summary>
|
||||
/// 计数
|
||||
/// </summary>
|
||||
private int _tickCount;
|
||||
|
||||
/// <summary>
|
||||
/// 关闭计时器
|
||||
/// </summary>
|
||||
private DispatcherTimer _timerClose;
|
||||
|
||||
private ShowAnimation ShowAnimation { get; set; }
|
||||
|
||||
private bool _shouldBeClosed;
|
||||
|
||||
public Notification()
|
||||
{
|
||||
WindowStyle = WindowStyle.None;
|
||||
AllowsTransparency = true;
|
||||
}
|
||||
|
||||
public static Notification Show(object content, ShowAnimation showAnimation = ShowAnimation.None, bool staysOpen = false)
|
||||
{
|
||||
var notification = new Notification
|
||||
{
|
||||
Content = content,
|
||||
Opacity = 0,
|
||||
ShowAnimation = showAnimation
|
||||
};
|
||||
|
||||
notification.Show();
|
||||
|
||||
var desktopWorkingArea = SystemParameters.WorkArea;
|
||||
var leftMax = desktopWorkingArea.Width - notification.ActualWidth;
|
||||
var topMax = desktopWorkingArea.Height - notification.ActualHeight;
|
||||
|
||||
switch (showAnimation)
|
||||
{
|
||||
case ShowAnimation.None:
|
||||
notification.Opacity = 1;
|
||||
notification.Left = leftMax;
|
||||
notification.Top = topMax;
|
||||
break;
|
||||
case ShowAnimation.HorizontalMove:
|
||||
notification.Opacity = 1;
|
||||
notification.Left = desktopWorkingArea.Width;
|
||||
notification.Top = topMax;
|
||||
notification.BeginAnimation(LeftProperty, AnimationHelper.CreateAnimation(leftMax));
|
||||
break;
|
||||
case ShowAnimation.verticalMove:
|
||||
notification.Opacity = 1;
|
||||
notification.Left = leftMax;
|
||||
notification.Top = desktopWorkingArea.Height;
|
||||
notification.BeginAnimation(TopProperty, AnimationHelper.CreateAnimation(topMax));
|
||||
break;
|
||||
case ShowAnimation.Fade:
|
||||
notification.Left = leftMax;
|
||||
notification.Top = topMax;
|
||||
notification.BeginAnimation(OpacityProperty, AnimationHelper.CreateAnimation(1));
|
||||
break;
|
||||
default:
|
||||
notification.Opacity = 1;
|
||||
notification.Left = leftMax;
|
||||
notification.Top = topMax;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!staysOpen) notification.StartTimer();
|
||||
|
||||
return notification;
|
||||
}
|
||||
|
||||
protected override void OnClosing(CancelEventArgs e)
|
||||
{
|
||||
base.OnClosing(e);
|
||||
|
||||
if (_shouldBeClosed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var desktopWorkingArea = SystemParameters.WorkArea;
|
||||
|
||||
switch (ShowAnimation)
|
||||
{
|
||||
case ShowAnimation.None:
|
||||
break;
|
||||
case ShowAnimation.HorizontalMove:
|
||||
{
|
||||
var animation = AnimationHelper.CreateAnimation(desktopWorkingArea.Width);
|
||||
animation.Completed += Animation_Completed;
|
||||
BeginAnimation(LeftProperty, animation);
|
||||
e.Cancel = true;
|
||||
_shouldBeClosed = true;
|
||||
}
|
||||
break;
|
||||
case ShowAnimation.verticalMove:
|
||||
{
|
||||
var animation = AnimationHelper.CreateAnimation(desktopWorkingArea.Height);
|
||||
animation.Completed += Animation_Completed;
|
||||
BeginAnimation(TopProperty, animation);
|
||||
e.Cancel = true;
|
||||
_shouldBeClosed = true;
|
||||
}
|
||||
break;
|
||||
case ShowAnimation.Fade:
|
||||
{
|
||||
var animation = AnimationHelper.CreateAnimation(0);
|
||||
animation.Completed += Animation_Completed;
|
||||
BeginAnimation(OpacityProperty, animation);
|
||||
e.Cancel = true;
|
||||
_shouldBeClosed = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void Animation_Completed(object sender, EventArgs e) => Close();
|
||||
|
||||
/// <summary>
|
||||
/// 开始计时器
|
||||
/// </summary>
|
||||
private void StartTimer()
|
||||
{
|
||||
_timerClose = new DispatcherTimer
|
||||
{
|
||||
Interval = TimeSpan.FromSeconds(1)
|
||||
};
|
||||
_timerClose.Tick += delegate
|
||||
{
|
||||
if (IsMouseOver)
|
||||
{
|
||||
_tickCount = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
_tickCount++;
|
||||
if (_tickCount >= WaitTime) Close();
|
||||
};
|
||||
_timerClose.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace HandyControl.Data
|
||||
{
|
||||
public enum ShowAnimation
|
||||
{
|
||||
None,
|
||||
HorizontalMove,
|
||||
verticalMove,
|
||||
Fade
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Magnifier.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\ButtonGroup.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Card.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Notification.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\Sprite.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\ToggleBlock.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Panel\HoneycombPanel.cs" />
|
||||
@@ -31,6 +32,7 @@
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\RangeThumb.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Slider\RangeSlider\TwoWayRangeBase.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Controls\Other\RunningBlock.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Data\Enum\ShowAnimation.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\CloseWindowCommand.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Interactivity\Commands\OpenLinkCommand.cs" />
|
||||
<Compile Include="$(MSBuildThisFileDirectory)Tools\Converter\BorderCircularClipConverter.cs" />
|
||||
@@ -688,6 +690,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\Notification.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="$(MSBuildThisFileDirectory)Themes\Styles\NumericUpDown.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:controls="clr-namespace:HandyControl.Controls">
|
||||
|
||||
<Style TargetType="controls:Notification">
|
||||
<Setter Property="controls:WindowAttach.IgnoreAltF4" Value="True"/>
|
||||
<Setter Property="controls:WindowAttach.ShowInTaskManager" Value="False"/>
|
||||
<Setter Property="SizeToContent" Value="WidthAndHeight"/>
|
||||
<Setter Property="ResizeMode" Value="NoResize"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="ShowActivated" Value="False"/>
|
||||
<Setter Property="ShowInTaskbar" Value="False"/>
|
||||
<Setter Property="Topmost" Value="True"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:Notification">
|
||||
<ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
@@ -72,6 +72,7 @@
|
||||
<ResourceDictionary Source="ToggleBlock.xaml"/>
|
||||
<ResourceDictionary Source="RunningBlock.xaml"/>
|
||||
<ResourceDictionary Source="Sprite.xaml"/>
|
||||
<ResourceDictionary Source="Notification.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
|
||||
</ResourceDictionary>
|
||||
Reference in new issue
Block a user