Exception:无法为“Automatic”的 Duration 值返回 TimeSpan 属性值。在从 Duration 请求 TimeSpan 属性值之前,检查 HasTimeSpan 属性。

报错信息 1
InvalidOperationException: 无法为“Automatic”的 Duration 值返回 TimeSpan 属性值。在从 Duration 请求 TimeSpan 属性值之前,检查 HasTimeSpan 属性。
StackTrace:
   在 System.Windows.Duration.get_TimeSpan()
   在 DynamicClass.Timer_Tick(Object sender, EventArgs e)
   在 System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
   在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

版本:1.44.1 2025-04-16 12:00 Microsoft Windows NT 10.0.26100.0