ArgumentOutOfRangeException: 长度不能小于 0。 参数名: length --Message: 长度不能小于 0。 参数名: length StackTrace: 在 System.String.Substring(Int32 startIndex, Int32 length) 在 DynamicClass.CustomWindowCode.<>c__DisplayClass10.<<OnWindowLoaded>b__2>d__12.MoveNext() --- 引发异常的上一位置中堆栈跟踪的末尾 --- 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 在 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)