Skip to content

Commit

Permalink
Merge branch 'main' into niels9001/settingsexpander-cornerradius-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Arlodotexe authored Jan 30, 2024
2 parents 34dfc12 + ea17664 commit 33f2553
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions components/Animations/src/Implicit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ public static void SetAnimations(UIElement element, ImplicitAnimationSet value)
/// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance for the current event.</param>
private static void OnShowAnimationsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
// See https://github.com/CommunityToolkit/Windows/issues/319
#if HAS_UNO
#pragma warning disable CS0162
return;
#endif

static void OnAnimationsChanged(object sender, EventArgs e)
{
var collection = (ImplicitAnimationSet)sender;
Expand Down Expand Up @@ -160,6 +166,10 @@ static void OnAnimationsChanged(object sender, EventArgs e)
ElementCompositionPreview.SetImplicitShowAnimation(element, null);
}
}

#if HAS_UNO
#pragma warning restore CS0162
#endif
}

/// <summary>
Expand All @@ -169,6 +179,12 @@ static void OnAnimationsChanged(object sender, EventArgs e)
/// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance for the current event.</param>
private static void OnHideAnimationsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
// See https://github.com/CommunityToolkit/Windows/issues/319
#if HAS_UNO
#pragma warning disable CS0162
return;
#endif

static void OnAnimationsChanged(object sender, EventArgs e)
{
var collection = (ImplicitAnimationSet)sender;
Expand Down Expand Up @@ -200,6 +216,10 @@ static void OnAnimationsChanged(object sender, EventArgs e)
ElementCompositionPreview.SetImplicitHideAnimation(element, null);
}
}

#if HAS_UNO
#pragma warning restore CS0162
#endif
}

/// <summary>
Expand All @@ -209,6 +229,12 @@ static void OnAnimationsChanged(object sender, EventArgs e)
/// <param name="e">The <see cref="DependencyPropertyChangedEventArgs"/> instance for the current event.</param>
private static void OnAnimationsPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
// See https://github.com/CommunityToolkit/Windows/issues/319
#if HAS_UNO
#pragma warning disable CS0162
return;
#endif

static void OnAnimationsChanged(object sender, EventArgs e)
{
var collection = (ImplicitAnimationSet)sender;
Expand Down Expand Up @@ -240,5 +266,9 @@ static void OnAnimationsChanged(object sender, EventArgs e)
ElementCompositionPreview.GetElementVisual(element).ImplicitAnimations = null;
}
}

#if HAS_UNO
#pragma warning restore CS0162
#endif
}
}

0 comments on commit 33f2553

Please sign in to comment.