我得到一个例外,
元素'System.Windows.Controls.Grid'的布局测量覆盖 不应该将NaN值作为DesiredSize返回。
StackTrace:
在System.Windows.UIElement.Measure(Size availableSize)at System.Windows.Controls.Canvas.MeasureOverride(大小约束)at System.Windows.FrameworkElement.MeasureCore(Size availableSize)at System.Windows.UIElement.Measure(Size availableSize)at System.Windows.Controls.Control.MeasureOverride(大小约束)at System.Windows.FrameworkElement.MeasureCore(Size availableSize)at System.Windows.UIElement.Measure(Size availableSize)at System.Windows.UIElement.Arrange(Rect finalRect)at System.Windows.Controls.Canvas.ArrangeOverride(Size arrangeSize)at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)at System.Windows.UIElement.Arrange(Rect finalRect)at System.Windows.ContextLayoutManager.UpdateLayout()at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
在System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
在System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)at System.Windows.Media.MediaContext.RenderMessageHandler(对象 resizedCompositionTarget)at System.Windows.Threading.ExceptionWrapper.InternalRealCall(代表 回调,对象args,Int32 numArgs)at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, 委托回调,Object args,Int32 numArgs,Delegate catchHandler)
如何解决这个问题?请帮帮我......