How supply info for a view to a region?

Jul 15, 2008 at 9:21 AM
Hi,

In CAB there was the class SmartPartInfo or derived ones providing information about a view like name, description, icons, etc. which had to be provided to a Workspace giving information for that view required to display the view correctly in the specific Workspace (e.g. a TabWorkspace required some icon for a specific view displayed as tab). What do you propose to use instead when using Composite WPF and it's regions. A region only supports a name. Would you create specific attached properties? What are your ideas about that issue?

Regards,
Tschaena
Jul 15, 2008 at 6:52 PM
Edited Jul 16, 2008 at 3:03 PM
One of the methods I use to solve this issue is to use databinding. For example in a tabcontrol you can modify ItemContainerStyle.This way you can specify a custom control template that for example binds the title property of the view to the header of a tabitem. This trick also works for other controls that are based on the itemscontrol.

EDIT: I wrote a blogpost on how to exactly do this http://blogs.infosupport.com/blogs/willemm/archive/2008/07/15/Customizing-regions-in-CompositeWPF.aspx it might help get your problem solved.