无效的属性值inputToolkit:ButtonSpinner属性TargetType -While Xap Loading

时间:2011-02-18 06:47:16

标签: .net silverlight c#-3.0 silverlight-3.0 silverlight-toolkit

我得到了这个例外,

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: 

我正在使用 Visual Studio 2008, Silverlight 3.0, Silverlight Toolkit 2009年7月, 适用于VS 2008 SP1的Silverlight工具。

1 个答案:

答案 0 :(得分:0)

如果您在visual studio中更改了用户设置,可以导入一些VsSettings或手动更改调试设置。

请恢复为Visual Studio IDE中的默认可视化C#设置。工具 - >导入和导出设置 - >重置所有设置

SL样式元素通常会吞下某些例外。您的调试设置可能是严格的:)

这个技巧对我有用,如果仍然不适合你请更新。

谢谢, 维杰。