Custom Region always recreated on folder navigation

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

Custom Region always recreated on folder navigation
 
This forum has moved to a new location. From now on, please post all your questions about Add-in Express Regions on .NET and VSTO forum.
Tilfried Weissenberger




Posts: 12
Joined: 2012-10-31
hi,

why is the panel always recreated on each click on a folder? This appears to happen, no matter which type of panel I choose.

regards, Tilli
Posted 31 Oct, 2012 09:45:51 Top
Andrei Smolin


Add-in Express team


Posts: 18849
Joined: 2006-05-11
Hello Tilli,

This occurs whenever the context matches that specified in properties of the corresponding ADXOlFormsCollectionItem. You can prevent the form from being displayed by setting ADXOlForm.Visible = false in the ADXOlForm.ADXBeforeFormShow event.


Andrei Smolin
Add-in Express Team Leader
Posted 31 Oct, 2012 09:53:18 Top
Tilfried Weissenberger




Posts: 12
Joined: 2012-10-31
I don't want to prevent my region from showing, but prevent it from being destroyed and recreated for each folder. I want my object to "live" alongside the (built-in) folder-tree.

At least this should not occur, if the context matched in the previous folder and still matches in the current folder. Can I detect the type and handle hiding and showing myself without being destroyed during folder-jumps?

regards, Tilli
Posted 31 Oct, 2012 10:35:15 Top
Andrei Smolin


Add-in Express team


Posts: 18849
Joined: 2006-05-11
Try using the OneInstanceForAllFolders value in the ADXOlFormsCollectionItem.Cached property.


Andrei Smolin
Add-in Express Team Leader
Posted 31 Oct, 2012 10:42:56 Top
Tilfried Weissenberger




Posts: 12
Joined: 2012-10-31
yes, that did the trick, thanks!
Posted 31 Oct, 2012 11:47:28 Top
Andrei Smolin


Add-in Express team


Posts: 18849
Joined: 2006-05-11
You are welcome!


Andrei Smolin
Add-in Express Team Leader
Posted 01 Nov, 2012 03:44:44 Top