2

我们正在开发支持标签的 SUR40 应用程序。但有时我们在移动标签时会在 TagVisualizationHostAdapter 内遇到奇怪且难以重现的崩溃。我们有一个充当 TagVisualizationHost 的 ScatterView。

在堆栈跟踪下方。任何人的想法?

谢谢,

马丁

System.ArgumentNullException: Value cannot be null. Parameter name: visualization

at Microsoft.Surface.Presentation.Controls.TagVisualizationHostAdapter.NotifyVisualizationMoved(TagVisualization visualization, Point center, Double orientation, UIElement relativeTo)
at Microsoft.Surface.Presentation.Controls.ScatterViewTagVisualizationHostAdapter.OnContainerMoved(ScatterViewItem container, Point containerCenter, Double containerOrientation)
at Microsoft.Surface.Presentation.Controls.ScatterViewTagVisualizationHostAdapter.OnContainerPositionChanged(ScatterContentControlBase item)
at Microsoft.Surface.Presentation.Controls.ScatterContentControlBase.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Microsoft.Surface.Presentation.Controls.ScatterContentControlBase.OnManipulationDeltaPrivate(ManipulationDeltaEventArgs e)
at Microsoft.Surface.Presentation.Controls.ScatterContentControlBase.OnManipulationDelta(ManipulationDeltaEventArgs e)
at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Input.ManipulationDevice.ProcessManipulationInput(InputEventArgs e)
at System.Windows.Input.ManipulationLogic.OnInertiaTick(Object sender, EventArgs e)
at System.Windows.Threading.DispatcherTimer.FireTick(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at System.Threading.ExecutionContext.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run()
at MaterialSource.App.Main()
4

1 回答 1

0

我知道这是一篇旧帖子,但我今天也遇到了同样的错误。我进行了更多测试,在我看来,错误与标签和表面之间的不正确接触有关。在我的情况下,如果我在我的代码仍在VisualizationAdded事件处理程序中时移动或删除标签,它似乎会发生。如果您发现了另一个原因,您可能想在这里分享吗?谢谢朱利安

于 2014-03-04T14:17:04.790 回答