UIExtensionSite Clear and Remove methods

Topics: CAB & Smart Client Software Factory
May 8, 2007 at 4:07 PM
Hi All

I am using CAB and I have a UIExtensionSite that i want populated when a workitem is loaded with MenuItems that are specifif to the workitem. I can load that but when i want to load another workitem, i want to be able to remove the UIElements added earlier on. I tried to use the Clear() and Remove() methods, they seem not to work.

my code is like so

UIExtensionSites(UIExtensionsConstants.FILEDROPDOWN).Clear() where FILEDROPDOWN is of tyep DropDownItems of a MenuItem

May 9, 2007 at 10:30 AM
I think you should register and unregister on demand a new UIExtensionSite which contains items you need. Also I would recommend to implement the service for that. You can look through the way Matias Woloski did it in his sample http://www.codeplex.com/cabextensions Each module has its own toolbar in this sample and he has a service to register them.

May 9, 2007 at 1:44 PM
my problem is trying to unregister a previously created UIExtenstionSite
May 10, 2007 at 4:11 PM
Hi folks

i need to create UIElements which are particular to a module or workitem at runtime. I need help on code that does that.
Also how do i load a module at runtime instead of putting the module name in the ProfileCatalog file.