Hi! I have a question.
I have a WPF UserControl representing a Person with many fields. Some Persons can be a company. In this case I'd like to use another template with other fields. The code behind is the same, that's why I want it as a 1 control only with 2 templates.
What I'd like to do is to be able to define these 2 templates with the VS designer support so I could easily change them.
The problem ist that some elements have EventHandlers attached (Click...) and I can't image how I could resolve that when using DataTemplate. (Perhaps supposing the bubble events register the EventHandler on one of the parents ? and then look for the original source name ?) Or should I use 2 UserControls and then somehow merge them in my main UserControl ?
Thank you in advance