获取RibbonPageGroup名称

时间:2014-04-12 05:51:36

标签: c# .net devexpress

我想从Ribbon Control中获取所有功能区页面组名称。在Windows表单应用程序中使用c#.net#

我试试

foreach (RibbonPageGroup rpg in ribbonControl1.Pages)
{


 }

1 个答案:

答案 0 :(得分:1)

您可以使用RibbonPage.Groups属性访问RibbonPageGroupCollection 试试这个

foreach (RibbonPage page in ribbonControl1.Pages)
{ 
  foreach (RibbonPageGroup group in page.Groups)
  {
    group.Name//Gets the name of the current component.
    group.Text//Gets or sets the text displayed within the group.
  }
}

参考: https://documentation.devexpress.com/#windowsforms/DevExpressXtraBarsRibbonRibbonPageGroupMembersTopicAll https://documentation.devexpress.com/#WindowsForms/clsDevExpressXtraBarsRibbonRibbonPageGroupCollectiontopic