Task Pane in Add-in Express

Add-in Express™ Support Service
That's what is more important than anything else

Task Pane in Add-in Express
 
Jamil Nawaz




Posts: 22
Joined: 2018-02-10
Hi,

I am using Task Panes (VSTO based) in my add-in. Right now what I did is, I created the user control, and then go to the addin module designer, and in properties, I created Task Panes by specifying it's control id etc. All good so far.

I notice that when add-in loads, it creates the instances of the panes (although I set them visible false by default, because in my case, those needs to be visible by some user action, i.e: user click on the ribbon button). My question is what is best approach, to work with Task Panes, like in my case.

Either create them at design time like I did or create them on run time, when user click on the button?

Please suggest the best approach?

Regards,
Jamil
Posted 11 Apr, 2018 07:26:36 Top
Andrei Smolin


Add-in Express team


Posts: 18793
Joined: 2006-05-11
Hello Jamil,

You should specify the task panes at the design time: populate the ADXAddinModule.TaskPanes collection with ADXTaskPane items; each ADXTaskPane defines common properties for future instances of the UserControl object specified in the ADXTaskPane.ControlProgId property.

At the run time, when Add-in Express detects a new host application window, it passes the ADXTaskPane.ControlProgId property to a method of the corresponding COM interface that creates an instance of that UserControl and shows it as a custom task pane.

To see how you can control the visibility of a task pane instance, search for preventFromShowing at https://www.add-in-express.com/forum/read.php?FID=5&TID=11757.


Andrei Smolin
Add-in Express Team Leader
Posted 11 Apr, 2018 08:00:54 Top