feat:Implements subtle animations for the NavMenu in a non-intrusive way.

This commit is contained in:
望尘空忧
2025-08-09 23:00:15 +08:00
parent 4a4e36d50d
commit bb7873ef66
2 changed files with 89 additions and 0 deletions

View File

@@ -1,11 +1,22 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using Ursa.Controls;
namespace Ursa.Demo.Pages;
public partial class NavMenuDemo : UserControl
{
private readonly WHAnimationHelper _animationHelper;
public NavMenuDemo()
{
InitializeComponent();
_animationHelper = new WHAnimationHelper(menu, NavMenu.IsHorizontalCollapsedProperty);
}
protected override void OnLoaded(RoutedEventArgs e)
{
base.OnLoaded(e);
_animationHelper.Start();
}
}