How supply info for a view to a region?

Jul 15, 2008 at 10:21 AM

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?

Jul 15, 2008 at 7:52 PM
Edited Jul 16, 2008 at 4: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 it might help get your problem solved.