This project is read-only.

ItemsControlUIAdapterFactory Limitations

Aug 13, 2007 at 7:21 PM
I'm in the process of porting a CAB application to WPF using this library, and I've noticed a problem with the way UI extension sites have been implemented in this library. I'm running into this problem with creating an extension site attached to a Separator control. The ItemsControlUIAdapterFactory currently supports only controls that are ItemsControls, but Separator isn't one of those controls. I can work around this for now by using a hidden MenuItem instead of a seperator, but it would be nice if I could have menu items added after a seperator.
Aug 14, 2007 at 4:03 AM
Hi John,

Can you please ellaborate a little on what you're trying to achieve? Are you just trying to have a site with multiple items separated by a Separator?

Thanks,
Kent
Aug 14, 2007 at 5:53 PM
Sure,

In my CAB application, I use menu items that are separators as extension sites so that new menu items are added below that separator rather than as children of the menu item. Doing this allows me to have different "zones" in a menu where I can add menu items. For example, in the File menu, I have a FileIOExtensionSite, which is a separator, where I add the Open and New menu items from a module. The current version of CAB supports this without any problems.

Since SCSFContrib doesn't support this mode, I created a SeperatorUIAdapterFactory and SeparatorUIAdapter that handle this. I'd be happy to send you these files. In case you're curious who I am, you can ask Glenn or Matias (I'm working in the MSF group of p&p).
Aug 15, 2007 at 6:29 AM
Thanks for the extra info John.

Actually, this is possible with the layer WPF/CAB, but not quite as seamlessly as you describe. You can use the ItemsControlUIAdapter.Index attached property to specify indexes of items inside the ItemsControl that is being used as an extension site.

However, the Separator extension site support sounds like a good idea as it alleviates the developer of maintaining these indexes. I'll probably add this ability over the weekend.

Regards,
Kent
Aug 15, 2007 at 2:39 PM
I moved this to a work item: http://www.codeplex.com/scsfcontrib/WorkItem/View.aspx?WorkItemId=4938
May 16, 2014 at 8:59 AM