I have figured out what works for this.
ribbon.Refresh()
'refresh size of ribbonPanel1, barlayout for the show/hide of miRoom
RibbonPanel1.PerformLayout()
ribbon.PerformLayout()
my button was within RibbonPanel1, and this was shown by a tabItem on the ribbon, the RibbonPanel1 was also on the ribbon (as otherwise it wont show)