diff --git a/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs b/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs index 716c1f8..c2982dc 100644 --- a/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs +++ b/Wpf_AiSportsMicrospace/MyUserControl/CoverFlowControl.xaml.cs @@ -23,7 +23,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl private const double CardWidth = 368; private const double CardHeight = 534; private const double CardGap = 30; // 卡片之间水平间距 - private const double SlideDurationMs = 180; // 动画时长 + private const double SlideDurationMs = 200; // 动画时长 private const double ProgressDurationMs = 2600; public int SelectedIndex @@ -311,6 +311,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl Duration = new Duration(dur), EasingFunction = ease }; + Timeline.SetDesiredFrameRate(anim, 60); Storyboard.SetTarget(anim, fe); Storyboard.SetTargetProperty(anim, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)")); sb.Children.Add(anim); @@ -324,6 +325,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl Duration = new Duration(dur), EasingFunction = ease }; + Timeline.SetDesiredFrameRate(anim, 60); Storyboard.SetTarget(anim, fe); Storyboard.SetTargetProperty(anim, new PropertyPath("Opacity")); sb.Children.Add(anim); @@ -393,6 +395,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl Duration = new Duration(dur), EasingFunction = ease }; + Timeline.SetDesiredFrameRate(anim, 60); Storyboard.SetTarget(anim, fe); Storyboard.SetTargetProperty(anim, new PropertyPath("(UIElement.RenderTransform).(TranslateTransform.X)")); sb.Children.Add(anim); @@ -406,6 +409,7 @@ namespace Wpf_AiSportsMicrospace.MyUserControl Duration = new Duration(dur), EasingFunction = ease }; + Timeline.SetDesiredFrameRate(anim, 60); Storyboard.SetTarget(anim, fe); Storyboard.SetTargetProperty(anim, new PropertyPath("Opacity")); sb.Children.Add(anim); diff --git a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs index cf49931..ae19415 100644 --- a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs @@ -35,7 +35,7 @@ namespace Wpf_AiSportsMicrospace private DateTime _lastMenuSlideTime = DateTime.MinValue; private bool _menuWaveConsumed; private bool _isNavigating; - private const int MenuSlideCooldownMs = 150; + private const int MenuSlideCooldownMs = 100; public Home() {