【问题标题】:Invalid attribute value inputToolkit:ButtonSpinner for property TargetType -While Xap Loading无效的属性值 inputToolkit:属性 TargetType 的ButtonSpinner - 当 Xap 加载时
【发布时间】:2011-02-18 06:47:15
【问题描述】:

我得到了这个异常,

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: 

我正在使用 视觉工作室 2008, 银光3.0, Silverlight 工具包 2009 年 7 月, VS 2008 SP1 的 Silverlight 工具。

【问题讨论】:

  • 你能显示使用 ButtonSpinner 的 Xaml 吗?我可能对我们真正能够看到分配了 TargetType 的值很有用。
  • 我在 silverlight 应用程序中使用了这个 inputToolkit:ButtonSpinner,我在整个解决方案中搜索这个词。找不到 inputToolkit:ButtonSpinner。但是相同的解决方案在其他机器上也有效。我无法理解问题。
  • @AnthonyWJones :我更新了我的问题。

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


【解决方案1】:

如果您在 Visual Studio 中更改了用户设置,请通过导入一些 VsSettings 或手动更改调试设置。

请在 Visual Studio IDE.Tools->导入和导出设置->重置所有设置中恢复为默认的 Visual C# 设置

SL 样式元素通常会处理某些异常。您的调试设置可能很严格 :)

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

谢谢, 维杰。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-11-22
    • 2016-04-10
    • 2012-04-03
    相关资源
    最近更新 更多