This commit is contained in:
NaBian committed 2019-08-16 22:06:51 +08:00
1 parent 2ddfaf9f9e
commit c2bfe12a28
4 files changed
+13 -4

No files matched your search

@@ -3,6 +3,8 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:hc="https://handyorg.github.io/handycontrol" xmlns:hc="https://handyorg.github.io/handycontrol"
Background="White" Background="White"
BorderThickness="1"
BorderBrush="{DynamicResource BorderBrush}"
Width="320" Width="320"
Height="518"> Height="518">
<hc:SimplePanel> <hc:SimplePanel>
@@ -21,7 +21,11 @@ namespace HandyControlDemo.ViewModel
public ShowAnimation ShowAnimation public ShowAnimation ShowAnimation
{ {
get => _showAnimation; get => _showAnimation;
#if netle40
set => Set(nameof(ShowAnimation) ,ref _showAnimation, value);
#else
set => Set(ref _showAnimation, value); set => Set(ref _showAnimation, value);
#endif
} }
private bool _staysOpen = true; private bool _staysOpen = true;
@@ -29,7 +33,11 @@ namespace HandyControlDemo.ViewModel
public bool StaysOpen public bool StaysOpen
{ {
get => _staysOpen; get => _staysOpen;
#if netle40
set => Set(nameof(StaysOpen) ,ref _staysOpen, value);
#else
set => Set(ref _staysOpen, value); set => Set(ref _staysOpen, value);
#endif
} }
} }
} }
@@ -1,6 +1,5 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Threading.Tasks;
using System.Windows; using System.Windows;
using System.Windows.Threading; using System.Windows.Threading;
using HandyControl.Data; using HandyControl.Data;
@@ -60,7 +59,7 @@ namespace HandyControl.Controls
notification.Top = topMax; notification.Top = topMax;
notification.BeginAnimation(LeftProperty, AnimationHelper.CreateAnimation(leftMax)); notification.BeginAnimation(LeftProperty, AnimationHelper.CreateAnimation(leftMax));
break; break;
case ShowAnimation.verticalMove: case ShowAnimation.VerticalMove:
notification.Opacity = 1; notification.Opacity = 1;
notification.Left = leftMax; notification.Left = leftMax;
notification.Top = desktopWorkingArea.Height; notification.Top = desktopWorkingArea.Height;
@@ -106,7 +105,7 @@ namespace HandyControl.Controls
_shouldBeClosed = true; _shouldBeClosed = true;
} }
break; break;
case ShowAnimation.verticalMove: case ShowAnimation.VerticalMove:
{ {
var animation = AnimationHelper.CreateAnimation(desktopWorkingArea.Height); var animation = AnimationHelper.CreateAnimation(desktopWorkingArea.Height);
animation.Completed += Animation_Completed; animation.Completed += Animation_Completed;
@@ -4,7 +4,7 @@
{ {
None, None,
HorizontalMove, HorizontalMove,
verticalMove, VerticalMove,
Fade Fade
} }
} }