我正在尝试在.Net 4.5框架上开发一个带有Ribbon控件的WPF应用程序。据我所知,MSDN Ribbon Class现在已经包含在Net 4.5框架中,因此我不需要再添加这个了。
但是当我尝试添加以下代码时:
我遇到了以下错误。我是否漏掉了什么?
但是当我尝试添加以下代码时:
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<StackPanel>
<Ribbon>
</Ribbon>
</StackPanel>
</Window>
我遇到了以下错误。我是否漏掉了什么?
The tag 'Ribbon' does not exist in XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'.
编辑:
using System.Windows.Controls.Ribbon;
也不起作用。
The type or namespace name 'Ribbon' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference?) c:\tmp\tst2\tst2\MainWindow.xaml.cs
xmlns:ribbon="clr-namespace:System.Windows.Controls.Ribbon;assembly=System.Windows.Controls.Ribbon"
抛出错误1:命名空间'System.Windows.Controls'中不存在类型或命名空间名称'Ribbon'(是否缺少程序集引用?) C:\tmp\tst2\tst2\obj\Debug\MainWindow.g.cs 18 31 tst2,这太奇怪了。 - noway