问题描述
当我尝试加载我得到的自定义控制资源字典时。
例外:构建项目时出错。请重建项目。
StackTrace:空
异常:灾难性故障(HRESULT异常:0x8000FFFF(E_UNEXPECTED))
$ b Windows.UI.Xaml.Automation.AutomationProperties.GetName(DependencyObject元素)中的$ b有时所有文档都显示此信息exception:
System.NullReferenceException:对象引用未设置为对象的实例。
在Microsoft.Expression.DesignSurface.ViewModel.NodeViewPair.get_NodePath()
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.DrillInPathIsValid(DocumentNodePath selectedElementPath,NodeViewPair drillInContainer)
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.GetDrillInEntry(DocumentNodePath selectedElementPath)
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.GetChildNodeViewPair(EditContext editContext)
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.MultiHistoryWalker。<> c__DisplayClass22。< WalkContextsBelowActive> b__1f(EditContext context,Boolean isGhosted)
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.Walk(EditContext startAtContext,EditContext stopAtContext,Boolean reverseWalk,SingleHistoryCallback回调)
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.Walk(EditContext startAtContext,Boolean reverseWalk,SingleHistoryCallback回调)
在Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.MultiHistoryWalker.WalkContextsBelowActive(MultiHistoryCallback回调)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.MultiHistoryWalker.Walk(Boolean reverseWalk,MultiHistoryCallback callback)
在Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataContextAncestorWalker.GetEditContextChain(SceneViewModel viewModel)
在Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataContextAncestorWalker.InitializePath(SceneNode targetNode,IProperty targetProperty)
在Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataContextEvaluator.Evaluate(SceneNode target,IPropertyId targetProperty,Boolean isForSettingValue)
在Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataPanelModel.UpdateActiveDataContext()
在Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataPanelModel.ViewModel_LateSceneUpdatePhase(Object sender,SceneUpdatePhaseEventArgs args)
在Microsoft.Expression.DesignSurface.ViewModel.SceneUpdatePhaseEventHandler.Invoke(Object sender,SceneUpdatePhaseEventArgs args)
在Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.FireLateSceneUpdatePhase(SceneUpdatePhaseEventArgs args)
在Microsoft.Expression.DesignSurface.Pipeline.SceneViewUpdateScheduleTask.UpdateLate()
在Microsoft.Expression.Utility.Scheduler.ScheduleTask.Update()
在Microsoft.Expression.Utility.Scheduler.SchedulingService.DispatchTasksAtPriority(DispatcherPriority priority)
在Microsoft.Expression.Utility.Scheduler.SchedulingService.DispatcherToken.Dispatch(Object arg)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调,对象args,Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate method,Object args,Int32 numArgs,Delegate catchHandler)
在System.Windows.Threading.DispatcherOperation.InvokeImpl()
在System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(对象状态)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)
在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)
在System.Windows.Threading.DispatcherOperation.Invoke()
在System.Windows.Threading.Dispatcher.ProcessQueue()
在System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& handling)
在MS.Win32.HwndWrapper.WndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam,Boolean& processed)
在MS.Win32.HwndSubclass.DispatcherCallbackOperation(对象o)
在System.Windows.Threading.ExceptionWrapper.InternalRealCall(委托回调,对象args,Int32 numArgs)
at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source,Delegate method,Object args,Int32 numArgs,Delegate catchHandler)
在System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority,TimeSpan timeout,Delegate方法,Object args,Int32 numArgs)
在MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd,Int32 msg,IntPtr wParam,IntPtr lParam)
在MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
在System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame框架)
在System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame框架)
在System.Windows.Threading.Dispatcher.Run()
在System.Windows.Application.RunDispatcher(对象忽略)
在System.Windows.Application.RunInternal(窗口窗口)
在System.Windows.Application.Run(窗口窗口)
在System.Windows.Application.Run()
在Microsoft.Expression.DesignHost.Isolation.IsolationProcess.RunApplication()
在Microsoft.Expression.DesignHost.Isolation.IsolationProcess.DesignProcessViewProvider。<> c__DisplayClass7。< applicationView_Activated> b__6()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback,Object state,Boolean preserveSyncCtx)
在System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback回调,对象状态)
在System.Threading.ThreadHelper.ThreadStart()
编辑generic.xaml是否有效?
lh
When ever i try to load a my customcontrol resource dictionary i get.
Exception: There was an error building the project. Please rebuild the project.
StackTrace: Empty
Exception: Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))
at Windows.UI.Xaml.Automation.AutomationProperties.GetName(DependencyObject element)
And sometimes all documents just show this exception:
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Expression.DesignSurface.ViewModel.NodeViewPair.get_NodePath()
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.DrillInPathIsValid(DocumentNodePath selectedElementPath, NodeViewPair drillInContainer)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.GetDrillInEntry(DocumentNodePath selectedElementPath)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.GetChildNodeViewPair(EditContext editContext)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.MultiHistoryWalker.<>c__DisplayClass22.<WalkContextsBelowActive>b__1f(EditContext context, Boolean isGhosted)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.Walk(EditContext startAtContext, EditContext stopAtContext, Boolean reverseWalk, SingleHistoryCallback callback)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.EditContextHistory.Walk(EditContext startAtContext, Boolean reverseWalk, SingleHistoryCallback callback)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.MultiHistoryWalker.WalkContextsBelowActive(MultiHistoryCallback callback)
at Microsoft.Expression.DesignSurface.ViewModel.EditContextManager.MultiHistoryWalker.Walk(Boolean reverseWalk, MultiHistoryCallback callback)
at Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataContextAncestorWalker.GetEditContextChain(SceneViewModel viewModel)
at Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataContextAncestorWalker.InitializePath(SceneNode targetNode, IProperty targetProperty)
at Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataContextEvaluator.Evaluate(SceneNode target, IPropertyId targetProperty, Boolean isForSettingValue)
at Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataPanelModel.UpdateActiveDataContext()
at Microsoft.Expression.DesignSurface.UserInterface.DataPane.DataPanelModel.ViewModel_LateSceneUpdatePhase(Object sender, SceneUpdatePhaseEventArgs args)
at Microsoft.Expression.DesignSurface.ViewModel.SceneUpdatePhaseEventHandler.Invoke(Object sender, SceneUpdatePhaseEventArgs args)
at Microsoft.Expression.DesignSurface.ViewModel.SceneViewModel.FireLateSceneUpdatePhase(SceneUpdatePhaseEventArgs args)
at Microsoft.Expression.DesignSurface.Pipeline.SceneViewUpdateScheduleTask.UpdateLate()
at Microsoft.Expression.Utility.Scheduler.ScheduleTask.Update()
at Microsoft.Expression.Utility.Scheduler.SchedulingService.DispatchTasksAtPriority(DispatcherPriority priority)
at Microsoft.Expression.Utility.Scheduler.SchedulingService.DispatcherToken.Dispatch(Object arg)
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.DispatcherOperation.InvokeImpl()
at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
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.LegacyInvokeImpl(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.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at System.Windows.Threading.Dispatcher.Run()
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at System.Windows.Application.Run(Window window)
at System.Windows.Application.Run()
at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.RunApplication()
at Microsoft.Expression.DesignHost.Isolation.IsolationProcess.DesignProcessViewProvider.<>c__DisplayClass7.<applicationView_Activated>b__6()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Is editing of generic.xaml suppose to work?
lh
这篇关于混合:generic.xaml中的灾难性故障(来自HRESULT的异常:0x8000FFFF(E_UNEXPECTED))的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!