当前位置: 动力学知识库 > 问答 > 编程问答 >

.net - Invalid attribute value inputToolkit:ButtonSpinner for property TargetType -While Xap Loading

问题描述:

This Exception I got,

System.Windows.Markup.XamlParseException was unhandled by user code

Message="System.Windows.Markup.XamlParseException: Invalid attribute value StylePalette for property Property. [Line: 6024 Position: 26]\r\n at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse)\r\n at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers)\r\n at System.Windows.Markup.XamlReader.Load(String xaml)\r\n at System.Windows.Controls.Theming.ResourceParser.Parse(Stream stream, Boolean checkTypes)\r\n at System.Windows.Controls.Theming.Theme.LoadTheme(Stream themeResourceStream)\r\n at System.Windows.Controls.Theming.Theme..ctor(Assembly themeAssembly, String themeResourceName)\r\n at System.Windows.Controls.Theming.TwilightBlueTheme..ctor() [Line: 0 Position: 0]\r\n --- Inner Exception

---\r\nInvalid attribute value StylePalette for property Property. [Line: 6024 Position: 26]\r\n"

LineNumber=0

LinePosition=0

StackTrace:

at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)

at SilverlightApplication7.MainPage.InitializeComponent()

at SilverlightApplication7.MainPage..ctor(String ImagePath, String serviceUrl, String docId)

at SilverlightImageApplication.App.Application_Startup(Object sender, StartupEventArgs e)

at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)

at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)

InnerException: System.Windows.Markup.XamlParseException

Message="Invalid attribute value StylePalette for property Property. [Line: 6024 Position: 26]"

LineNumber=6024

LinePosition=26

StackTrace:

at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers, Boolean expandTemplatesDuringParse)

at MS.Internal.XcpImports.CreateFromXaml(String xamlString, Boolean createNamescope, Boolean requireDefaultNamespace, Boolean allowEventHandlers)

at System.Windows.Markup.XamlReader.Load(String xaml)

at System.Windows.Controls.Theming.ResourceParser.Parse(Stream stream, Boolean checkTypes)

at System.Windows.Controls.Theming.Theme.LoadTheme(Stream themeResourceStream)

at System.Windows.Controls.Theming.Theme..ctor(Assembly themeAssembly, String themeResourceName)

at System.Windows.Controls.Theming.TwilightBlueTheme..ctor()

InnerException:

I am using

Visual Studio 2008,

Silverlight 3.0,

Silverlight Toolkit July 2009,

Silverlight Tools for VS 2008 SP1.

网友答案:

If you have changed the user settings in visual studio , by importing some VsSettings or by changing the debug settings manually.

Please revert to the default visual C# settings in the Visual Studio IDE.Tools->Import and Export Settings-> Reset All settings

The SL styling elements usually swallows certain exceptions.Your debug settings might be strict :)

This trick worked for me, please update if still not working for you.

Thanks, Vijay.

分享给朋友:
您可能感兴趣的文章:
随机阅读: