UIElementAdapter enhancement!!!

Topics: CAB & Smart Client Software Factory
Dec 4, 2005 at 5:47 PM
originally posted by: allann

Is it possible to further extend the Interface or the ToolStripItemCollectionUIAdapter to include the Insert functionality so that items can be placed at a specific location in the underlying collection? The collection already supports the feature! One thing I find annoying about wrappers to existing classes is that they remove functionality (inadvertently sometimes) instead of extending their functionality.

Also on an aside, you have added generics (to the class mentioned above) but internally you are still boxing (cast to object) in GetInsertingIndex, and the parameter is not even used (I realise this is due to external items possibly overriding this method but it is specifically ToolStripItem in this class already.
Dec 6, 2005 at 11:43 AM
originally posted by: BradWilsonMSFT

Since the CAB source code is provided, you can of course make any extensions like this you see fit. :)