银光JetPack主题工具包错误

3

从已安装的JetPack主题模板创建一个新的Silverlight应用程序后,我尝试按照App.xaml文件中提供的说明启用Silverlight工具包控件的主题。

            <!--
            <ResourceDictionary Source="Assets/ToolkitStyles.xaml"/>
            To extend this theme to include the toolkit controls:
            1. Install the Silverlight Toolkit for Silverlight 4
            2. Add a Toolkit control to your project from the toolbox. This will add references to toolkit assemblies.
            3. Change the "Build Action" for ToolkitStyles.xaml to "Page"
            4. Uncomment the resource dictionary include above.

            If you do not intend to use toolkit controls, delete this comment and the ToolkitStyles.xaml file.-->

我按照指示正确操作,但是项目现在无法编译,这里是它抛出的39个错误。

我对Silverlight很新(来自MVC / jQuery),可能是我做错了什么。

Error 40 An error occurred while finding the resource dictionary "Assets/ToolkitStyles.xaml". X:\Projects\ISMM\ISMM.SilverlightUI\app.xaml 18 17 ISMM.SilverlightUI

Error 20 Assembly 'System.Windows.Controls.DataVisualization.Toolkit' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1 603 ISMM.SilverlightUI

Error 19 Assembly 'System.Windows.Controls.Input.Toolkit' was not found. Verify that you are not missing an assembly reference. Also, verify that your project and all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1 421 ISMM.SilverlightUI

Error 39 The attachable property 'Effect' was not found in type 'Legend'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2204 38 ISMM.SilverlightUI Error 34 The attachable property 'IsFieldGroup' was not found in type 'DataField'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1738 27 ISMM.SilverlightUI

Error 31 The attachable property 'LayoutTransform' was not found in type 'LayoutTransformer'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1619 38 ISMM.SilverlightUI

Error 13 The property 'IsFieldGroup' does not exist on the type 'Grid' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1738 27 ISMM.SilverlightUI

Error 11 The tag 'AccordionButton' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1622 38 ISMM.SilverlightUI Error 2 The tag 'ButtonSpinner' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 565 26 ISMM.SilverlightUI

Error 3 The tag 'ButtonSpinner' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 665 26 ISMM.SilverlightUI

Error 4 The tag 'ButtonSpinner' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 896 26 ISMM.SilverlightUI Error 16 The tag 'EdgePanel' does not exist in XML namespace 'clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2199 34 ISMM.SilverlightUI

Error 1 The tag 'ExpandableContentControl' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 365 34 ISMM.SilverlightUI Error 12 The tag 'ExpandableContentControl' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1624 34 ISMM.SilverlightUI

Error 9 The tag 'LayoutTransformer' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1455 38 ISMM.SilverlightUI Error 10 The tag 'LayoutTransformer' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1618 34 ISMM.SilverlightUI

Error 17 The tag 'Legend' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2203 34 ISMM.SilverlightUI Error 5 The tag 'LinearClipper' does not exist in XML namespace 'clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 975 26 ISMM.SilverlightUI

Error 7 The tag 'ListTimePickerPopup' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1122 22 ISMM.SilverlightUI

Error 14 The tag 'ResourceDictionaryCollection' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1960 18 ISMM.SilverlightUI

Error 6 The tag 'TimePickerPopupTemplate' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1121 18 ISMM.SilverlightUI

Error 8 The tag 'TimeUpDown' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1230 26 ISMM.SilverlightUI

Error 15 The tag 'Title' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit'. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2193 30 ISMM.SilverlightUI

Error 37 The type 'dvp:EdgePanel' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2199 34 ISMM.SilverlightUI

Error 25 The type 'prim:LinearClipper' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 975 26 ISMM.SilverlightUI

Error 32 The type 'toolkit:AccordionButton' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1622 38 ISMM.SilverlightUI

Error 22 The type 'toolkit:ButtonSpinner' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 565 26 ISMM.SilverlightUI

Error 23 The type 'toolkit:ButtonSpinner' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 665 26 ISMM.SilverlightUI

Error 24 The type 'toolkit:ButtonSpinner' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 896 26 ISMM.SilverlightUI

Error 21 The type 'toolkit:ExpandableContentControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 365 34 ISMM.SilverlightUI

Error 33 The type 'toolkit:ExpandableContentControl' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1624 34 ISMM.SilverlightUI

Error 29 The type 'toolkit:LayoutTransformer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1455 38 ISMM.SilverlightUI

Error 30 The type 'toolkit:LayoutTransformer' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1618 34 ISMM.SilverlightUI Error 38 The type 'toolkit:Legend' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2203 34 ISMM.SilverlightUI

Error 27 The type 'toolkit:ListTimePickerPopup' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1122 22 ISMM.SilverlightUI

Error 35 The type 'toolkit:ResourceDictionaryCollection' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1960 18 ISMM.SilverlightUI

Error 26 The type 'toolkit:TimePickerPopupTemplate' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1121 18 ISMM.SilverlightUI

Error 28 The type 'toolkit:TimeUpDown' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 1230 26 ISMM.SilverlightUI

Error 36 The type 'toolkit:Title' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. X:\Projects\ISMM\ISMM.SilverlightUI\Assets\ToolkitStyles.xaml 2193 30 ISMM.SilverlightUI

2个回答

5

看起来是工具包的问题。您在项目中有哪些引用?

工具包由许多程序集组成。看起来它需要一些程序集,如“System.Windows.Controls.DataVisualization.Toolkit”和“System.Windows.Controls.Input.Toolkit”。DockPanel是“System.Windows.Controls.Toolkit”或类似的一部分,因此当您拖动DockPanel时可能已经添加了它。


基础项目模板会自动引用,我将一个DockPanel拖放到main.xaml文件中以获取工具包的引用。这里是否有缺失的工具包引用? - Phil
哦,我刚才使用添加参考方法了解了一下,我明白你的意思了。我猜指南真的需要说,请拖动多种类型的工具包控件来获取正确的程序集!现在问题已经解决了 :-) - Phil
你能把一些评论区的内容编辑到答案正文中,以便更明确地表明这是一个答案吗?谢谢。 - Bill the Lizard
已完成-我将我的评论移动到答案中。 - Chris Shepherd

0

我曾经遇到过类似的问题,后来通过添加对 System.Windows.Controls.Input.ToolkitSystem.Windows.Controls.DataVisualization.Toolkit 的引用解决了它。


为什么您会回答与8个月前的已接受答案相同的内容? - mbinette

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接