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)