System.InvalidOperationException:无法解析TargetName ThumbVisual [英] System.InvalidOperationException: Cannot resolve TargetName ThumbVisual
问题描述
大家好,
我开发了一个silverlight应用程序。应用程序内部有很多控件,例如treeview,datagrid,bing maps等。我创建了一个按钮,以便单击并显示子窗口。它提示我下面的错误消息。
消息:Silverlight应用程序中未处理的错误
代码:4004
类别:ManagedRuntimeError
消息:System.InvalidOperationException:无法解析TargetName ThumbVisual。
at MS.Internal.XcpImports.VisualStateManager_GoToState(Control reference,String StateName,Boolean useTransitions,Boolean& refreshInheritanceContext)
在System.Windows.VisualStateManager.GoToState(Control control,String stateName,Boolean useTransitions)
在System.Windows.Controls.Primitives.Thumb.UpdateVisualState(Boolean useTransitions)
在System.Windows.Controls.Primitives.Thumb.OnIsEnabledChanged(IsEnabledChangedEventArgs e)
在System.Windows.Controls.Control.OnIsEnabledChanged(控制控件,EventArgs args)
在MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj,IntPtr unmanagedObjArgs,Int32 argsTypeIndex,String eventName)
注意:有时它能够显示子窗口但是在我关闭Internet Explorer之后重新运行该应用程序。它再次提示我上面的错误信息。
请提供解决方案。
谢谢。
您需要调试才能找到导致问题的原因。我们无法分辨出"大量控制"中的哪一个。只需查看错误消息即可实现。
按调试模式在本地运行Silverlight应用程序,按F5键,您将暂停发生异常的地方。
Hi all,
I'm developed a silverlight application. Inside the application have a lot of control, for example, treeview, datagrid, bing maps and etc. I created a button in order to click and show a child window. It prompt me the error message below.
Message: Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.InvalidOperationException: Cannot resolve TargetName ThumbVisual.
at MS.Internal.XcpImports.VisualStateManager_GoToState(Control reference, String StateName, Boolean useTransitions, Boolean& refreshInheritanceContext)
at System.Windows.VisualStateManager.GoToState(Control control, String stateName, Boolean useTransitions)
at System.Windows.Controls.Primitives.Thumb.UpdateVisualState(Boolean useTransitions)
at System.Windows.Controls.Primitives.Thumb.OnIsEnabledChanged(IsEnabledChangedEventArgs e)
at System.Windows.Controls.Control.OnIsEnabledChanged(Control control, EventArgs args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
Note: Sometimes it able to show the child window but after I close the Internet Explorer and rerun the application. It prompt me the error message above again.
Please provide me the solution.
Thank you.
You need to debug to find what causes the problem. We cannot tell which of "a lot of control" makes it happen by just looking at the error message.
Run the Silverlight application locally in debug mode by pressing F5 and you will be paused where the exception occured.
这篇关于System.InvalidOperationException:无法解析TargetName ThumbVisual的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!