Adding a submenu to a USD hosted control is simple. To do this, first create a menu.
Go to the USD configuration and go to Toolbars. Create a new toolbar and save to unlock the Buttons:
Add a new button and name it Save.
Add a new Action and name it Test Hosted Control Save. The Action here on the Test Hosted Control will be Save.
We now have:
- A toolbar with a button. The toolbar is not associated with any hosted control
- A button with an action, “Save”
- The action which calls “Save” on the hosted control
The next step is to associate the Hosted Control with the toolbar. Let’s do this.
Go to the Toolbar and select Test Hosted Control:
Add the hosted control “Test Hosted Control”:
Restart USD and click on the Custom Hosted Control menu. You will see the new Save button:
Press the Save button. You will see the Save action in our custom control has been invoked.
I AM SPENDING MORE TIME THESE DAYS CREATING YOUTUBE VIDEOS TO HELP PEOPLE LEARN THE MICROSOFT POWER PLATFORM.
IF YOU WOULD LIKE TO SEE HOW I BUILD APPS, OR FIND SOMETHING USEFUL READING MY BLOG, I WOULD REALLY APPRECIATE YOU SUBSCRIBING TO MY YOUTUBE CHANNEL.
THANK YOU, AND LET'S KEEP LEARNING TOGETHER.
CARL