我在我正在处理的应用程序中遇到了一个罕见的问题。这种情况发生在罕见的情况下,但不是每次我在页面之间导航时都不必要,而我似乎无法绕过它。一直在阅读,并得出一个半结论性的理论,这可能与无效的跨线程访问有关。 Stacktrace如下:
System.Reflection.TargetInvocationException, mscorlib, Version=5.0.5.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e Message: [Arg_TargetInvocationException]
Arguments:
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.10411.00&File=mscorlib.dll&Key=Arg_TargetInvocationException HelpLink:
StackTrace: at System.Windows.Navigation.PageResourceContentLoader.EndLoad(IAsyncResult asyncResult)
at System.Windows.Navigation.NavigationService.ContentLoader_BeginLoad_Callback(IAsyncResult result)
at System.Windows.Navigation.PageResourceContentLoader.BeginLoad_OnUIThread(AsyncCallback userCallback, PageResourceContentLoaderAsyncResult result)
at System.Windows.Navigation.PageResourceContentLoader.<>c__DisplayClass4.<BeginLoad>b__0(Object args)
2013-02-01 15:56:43,593 [5640] DEBUG WellguideViewModel.class - RefreshGraphValues method called
MachineName:2013-02-01 15:53:53,548 [5640] DEBUG WellViewModel.class - WellViewModel constructor called
MachineName:2013-02-01 15:56:44,625 [1836] DEBUG WellguideViewModel.class - RefreshGraphValues method called
希望有人能够提供帮助:)
- 另外,我应该提一下我的组件在画布上绘制一些线条(PathFigure是特定的),因为我已经知道这个问题可能与绘制ui元素有关。
周末愉快!