Browse Source

Set default transition.

Not really sure we should be doing this, but the previous version had it (though it was using a mutable object as a `StyledProperty` default value which means the instance was shared: bad).
pull/11326/head
Steven Kirk 3 years ago
parent
commit
5470c1272f
  1. 7
      src/Avalonia.Controls/TransitioningContentControl.cs

7
src/Avalonia.Controls/TransitioningContentControl.cs

@ -24,6 +24,13 @@ public class TransitioningContentControl : ContentControl
public static readonly StyledProperty<IPageTransition?> PageTransitionProperty =
AvaloniaProperty.Register<TransitioningContentControl, IPageTransition?>(nameof(PageTransition));
[System.Diagnostics.CodeAnalysis.SuppressMessage("AvaloniaProperty", "AVP1012",
Justification = "Default property values shouldn't be set with SetCurrentValue.")]
public TransitioningContentControl()
{
PageTransition = new CrossFade(TimeSpan.FromMilliseconds(125));
}
/// <summary>
/// Gets or sets the animation played when content appears and disappears.
/// </summary>

Loading…
Cancel
Save