This project has moved. For the latest updates, please go here.

How to get CustomPane instane from CustomUI and vice versa

Jul 11, 2016 at 3:21 AM
I am playing around the COMAddin example.

I have a dropDown in custom ribbon and a few controls in custom pane. I want the dropDown onAction event update those controls in the custom pane, but I don't know how.

Tried TaskPane[0].Pane but seems wrong direction.

And vice versa, from msdn > Globals.Ribbons.Ribbon1.dropDown
In NetOffice, how can I access the dropDown from custom pane? GlobalHelperModules?

Please help. Thanks.
Coordinator
Jul 11, 2016 at 4:37 PM
TaskPanes[0] works fine normaly. Please note: TaskPanes[0].Pane is not accessible in the addin .ctor and the OnConnection method.
You can setTaskPanes[0].Visible/etc. before and this properties want be applied while creation.
(You can also implement the Tools.ITaskPane interface in your pane. for initialization)

There is no object model available for the Ribbon UI in NetOffice currently.sry
You have to deal with the ribbon elements trough the hard way. with the xml defined event schema.
(Typical is invalidate the control to raise the controls events you need, see extended addin example)

*Sebastian
Jul 13, 2016 at 2:38 PM
Edited Jul 14, 2016 at 2:37 AM
I managed to communicate between custom pane and custom ui via variable to keep the stage, then invalidate the control, save the stage to settings and monitor change property event at ITaskPane.

Thanks.