How to "decorate" a control in WPF?

I want some of the controls in my window to be surrounded by a border and a caption above them, which will contain a title that tells something about the control (for example, the list of people surrounded by a border and above the list has a shortcut with the text "My Persons" ). Since I want to apply this on many controls, I don't want to write a specific xaml for each one. Should I create a custom control or is there a way to use styles / templates for this?

Visual example:

http://dl.getdropbox.com/u/829214/example.GIF

+1


a source to share


2 answers


I would look at the beautifiers and adorner layer.



0


a source


Another way to achieve this would be to create a custom / custom control that is derived from the contentcontrol. Use contentcontrol to modify the content and design the control to look the way you want.



0


a source







All Articles