>Hi,
>To just answer the question: Since you can't have XAML you would have to do it in code. e.g:
public _ViewBase()
> {
> StackPanel sp = new StackPanel();
> Button b = new Button();
> b.Content = "Click me";
> sp.Children.Add(b);
> this.Content = sp;
> }
>But I agree with John - from a WPF POV this is very unlikely to be the right approach. Are you using MVVM for this app?
I don't think that would work. As soon as you add content to the UserControl it's going to replace your stack panel.
You could do it with view injection.
* Wait till the control is fully loaded.
* Detach the contents.
* Add your wrapper.
* Attach the contents to your wrapper.
But I don't recommend that either.