I am trying to build a custom control that I want to exist as the root element of my xaml.
I currently have
- the generic.xaml template sorted.
- A new template in the blend folder that will allow me to make a new 'DaveControl'
- The ability in blend to add content to it that will appear in the contentpresenter.
However, If I run it, the content disappears. It stays if I add the control to a usercontrol, but I don't want that to happen. then i won't be able to call base methods since UserControl Inherits from Control and the g.cs will always complain.
I need the class in the codebehind to have an implementation that I can overload a save method on. So the codebehind derives from a class that I wrote.
Effectively, I just want to say New Dave Control, go to the code behind and write one method, 'public override save'
Is this possible?