Skip to content

Commit 947a7b3

Browse files
committed
Fix issue: Expanded add expand & collapse animation (#202
1 parent 5822b76 commit 947a7b3

2 files changed

Lines changed: 391 additions & 109 deletions

File tree

src/WPFDevelopers.Shared/Core/Helpers/ElementHelper.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ public class ElementHelper : DependencyObject
2929
DependencyProperty.RegisterAttached("IsClear", typeof(bool), typeof(ElementHelper),
3030
new PropertyMetadata(false, OnIsClearChanged));
3131

32+
public static readonly DependencyProperty IsAnimationProperty =
33+
DependencyProperty.RegisterAttached("IsAnimation", typeof(bool),typeof(ElementHelper),
34+
new PropertyMetadata(true));
35+
3236
public static CornerRadius GetCornerRadius(DependencyObject obj)
3337
{
3438
return (CornerRadius) obj.GetValue(CornerRadiusProperty);
@@ -79,6 +83,16 @@ public static bool GetIsClear(UIElement element)
7983
return (bool)element.GetValue(IsClearProperty);
8084
}
8185

86+
public static void SetIsAnimation(DependencyObject obj, bool value)
87+
{
88+
obj.SetValue(IsAnimationProperty, value);
89+
}
90+
91+
public static bool GetIsAnimation(DependencyObject obj)
92+
{
93+
return (bool)obj.GetValue(IsAnimationProperty);
94+
}
95+
8296
private static void OnIsClearChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
8397
{
8498
var button = d as Button;

0 commit comments

Comments
 (0)