我想从Ribbon Control中获取所有功能区页面组名称。在Windows表单应用程序中使用c#.net#
我试试
foreach (RibbonPageGroup rpg in ribbonControl1.Pages)
{
}
答案 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