Search code examples
vb.netvisual-studiodevexpressribbonribbon-control

How to iterate through DevExpress items in RibbonPageGroup?


I need to iterate with a loop through all the items in a RibbonPageGroup. I try to set the Visibility property from all Ribbon Items to 'true/always'

    For Each rp As RibbonPage In ribbonControl.Pages
        rp.Visible = True
            For Each pg As RibbonPageGroup In rp.Groups
                    pg.Visible = True
                  For Each btn As DevExpress.XtraBars.BarButtonItem In pg.??????
                      btn.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
                Next
          Next
    Next

Solution

  • There are no bar items within the RibbonPageGroup. You can iterate bar item links via the RibbonPageGroup.ItemLinks property.

    Please refer to Accessing Bar Items and Links article for more information.