VB.NET WPF Ribbon 2010 .net 4.0 不起作用 3.5 起作用

发布于 2024-11-18 13:36:55 字数 1265 浏览 2 评论 0原文

我刚刚在 2 个不同的 Windows 7 机器上安装了 Microsoft Ribbon for WPF 2010。如果我创建一个 .net 3.5 项目,它可以正常工作,但是如果我创建一个 .net 4.0 项目,它就不行。

我可以加载示例功能区应用程序并且它可以工作,但是当我将功能区控件拖到上面时,它们只会形成一个透明框。

我注意到它不会使 XAML 正确。这是代码,上面是 4.0,下面是 3.5。我需要更改某些设置或选项吗?

<ribbon:Ribbon Height="136" HorizontalAlignment="Left" Name="Ribbon1" VerticalAlignment="Top" Width="618" />
    <ribbon:RibbonGroup Height="100" HorizontalAlignment="Left" Margin="72,36,0,0" Name="RibbonGroup1" VerticalAlignment="Top" Width="200" />
    <ribbon:RibbonTab Grid.RowSpan="2" Height="100" HorizontalAlignment="Left" Margin="96,50,0,0" Name="RibbonTab1" VerticalAlignment="Top" Width="200" />
    <ribbon:RibbonGroup Grid.RowSpan="2" Height="100" HorizontalAlignment="Left" Margin="156,80,0,0" Name="RibbonGroup2" VerticalAlignment="Top" Width="200" />


<my:Ribbon Height="139" HorizontalAlignment="Left" Name="Ribbon1" VerticalAlignment="Top" Width="503">
        <my:RibbonTab Header="Tab" Name="RibbonTab1">
            <my:RibbonGroup Header="Group" Name="RibbonGroup1">
                <my:RibbonButton Label="Button" Name="RibbonButton1" />
            </my:RibbonGroup>
        </my:RibbonTab>
    </my:Ribbon>

I just installed Microsoft Ribbon for WPF 2010 on 2 different windows 7 boxes. If I make a .net 3.5 project it works fine but a .net 4.0 it does not.

I can load the sample ribbon application and it works but when I drag the ribbon controls over they just make a transparent box.

I notice it does not make the XAML correct. Here is the code, 4.0 on top then 3.5 below it. Is there some setting or option I need to change?

<ribbon:Ribbon Height="136" HorizontalAlignment="Left" Name="Ribbon1" VerticalAlignment="Top" Width="618" />
    <ribbon:RibbonGroup Height="100" HorizontalAlignment="Left" Margin="72,36,0,0" Name="RibbonGroup1" VerticalAlignment="Top" Width="200" />
    <ribbon:RibbonTab Grid.RowSpan="2" Height="100" HorizontalAlignment="Left" Margin="96,50,0,0" Name="RibbonTab1" VerticalAlignment="Top" Width="200" />
    <ribbon:RibbonGroup Grid.RowSpan="2" Height="100" HorizontalAlignment="Left" Margin="156,80,0,0" Name="RibbonGroup2" VerticalAlignment="Top" Width="200" />


<my:Ribbon Height="139" HorizontalAlignment="Left" Name="Ribbon1" VerticalAlignment="Top" Width="503">
        <my:RibbonTab Header="Tab" Name="RibbonTab1">
            <my:RibbonGroup Header="Group" Name="RibbonGroup1">
                <my:RibbonButton Label="Button" Name="RibbonButton1" />
            </my:RibbonGroup>
        </my:RibbonTab>
    </my:Ribbon>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

思慕 2024-11-25 13:36:55

Microsoft Ribbon 控件(2010 年 10 月发布)就是一个笑话。他们让它工作......“大部分”,然后留下了充满错误的东西而没有修复它们。 “它将在下一版本的 Visual Studio 中正常工作”...嗯,好的。

我尝试使用它,但总是感到沮丧。 DevComponents 为 WPF 提供了相当可靠的 Ribbon 控件。我推荐它。但我对此仍然有一些问题。

祝你好运!

The Microsoft Ribbon control (Oct 2010 release) is a joke. They got it working..."mostly" and then left it full of bugs without fixing them. "It will work properly in the next version of Visual Studio"...um, okay.

I tried to use it and was constantly frustrated. DevComponents has a pretty solid Ribbon control for WPF. I recommend it. But I still have a couple of issues with that one, too.

Good luck!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文