What is the syntax for triggering a click event for clicking on an item in a gallery ribbon control in VB?

Viewed 37

This is for a Microsoft Word add-in I am working on with Visual Studio in VB.

I have a gallery ribbon control (Gallery1) with 4 items (Item0, Item1, etc.). Normally I handle click events with buttons that are in dropdown controls but would like to use the gallery for these functions. Galleries have buttons too but also have items that display in a format I would like to take advantage of.

For buttons I would use:

Private Sub Button1_Click(sender As Object, e As RibbonControlEventArgs) Handles Button1.Click

And for the gallery control I have tried this:

Private Sub Gallery1_Click(sender As Object, e As RibbonControlEventArgs) Handles Gallery1.Click

but that treats all items in the control the same where instead I want item0 to trigger a different action than item1, etc.

What is the syntax of handling the click of an item in a gallery? Thank you.

0 Answers
Related