0

I am using DevExpress WPF MVVM Framework. I want to add buttons above the "Home" tab as shown by this image. How is it possible? enter image description here

<dxb:BarManager> 
    <dxb:BarManager.Items>
        <dxb:BarButtonItem x:Name="barButtonItem1" Content="About" Glyph="pack://application:,,,/DevExpress.Images.v13.1;component/Images/Support/Info_16x16.png" LargeGlyph="pack://application:,,,/DevExpress.Images.v13.1;component/Images/Support/Info_32x32.png" Command="{Binding ShowAboutCommand}"/>
        <dxb:BarButtonItem x:Name="barButtonItem2" Content="New" />
        <dxb:BarButtonItem x:Name="SaveCommandBarButtonItem" Content="Save" />
    </dxb:BarManager.Items>
...               
4

3 回答 3

2

Dua,请访问此链接http://www.devexpress.com/Support/Center/Question/Details/Q510019,同样的问题已发布在那里。也许它会帮助你。

Devexpress 常见问题解答提供了提出问题的工具,Devexpress 支持团队可以更好地回答与他们的工具相关的问题。谢谢, 塔米恩

于 2013-07-18T09:59:23.733 回答
0

您不能在 RibbonControl 的任何位置添加按钮,因为 RibbonControl 不打算以这种方式使用。您应该使用组合成页面的功能区项目链接(按钮、子菜单、就地编辑器、画廊等)。请查看RibbonControl 概念文章以获取更多信息。 相关示例:如何创建功能区控件

如果要在 RibbonControl(页眉区域)的右边缘添加项目,可以使用如何将命令添加到页眉区域文章中描述的方法。

如果要将项目添加到 RibbonControl(快速访问工具栏)的顶部边缘,可以使用如何将项目添加到快速访问工具栏文章中描述的方法。

PS 我看到你正在使用 MVVM 框架。因此,您还应该查看以下文章:MVVM Framework Getting Started (Lesson 2) - Customize a Ribbon and Create an About Button

于 2013-07-16T12:27:01.177 回答
0

你愿意做的不是添加一个按钮,而是一个页面

看看下面的这个链接:

http://documentation.devexpress.com/#wpf/CustomDocument7954


编辑由于评论

您要添加按钮的“区域”称为功能区中的页眉

下面的这个链接显示了如何在那里但是他们:

http://documentation.devexpress.com/#wpf/CustomDocument8186

我不确定您将拥有什么尺寸/定位功能(考虑到您在图像中想要的确切布局)。

于 2013-07-16T11:56:26.457 回答