Create MdiChild in UserControl or other Xaml?

Jan 20, 2010 at 11:18 PM

There currently doesn't appear to be way a way to create MdiChild outside of the Main.xaml or programmatically like this:

           Container.Children.Add(new MdiChild()
                Title = "NVCLT050 Using Code",
                Content = new ClientProductForm(),
                Width = 714,
                Height = 734,
                Margin = new Thickness(200, 30, 0, 0)

I want to create many different MdiChild windows across different Wpf class library projects to add to the MdiContainer dynamically. Is this something you have thought of - if so, how could it be done? Any hints on what I could try to build it myself?

For example, something like this...? Obviously there would be no designer support, but at least it would be easy to manage the source

<mdi:MdiChild x:Class="StandaloneChild"
        <Button Name="DisableMinimize" Height="20" >Disable Minimize</Button>
        <Button Name="EnableMinimize" Height="20" >Enable Minimize</Button>
        <Button Name="DisableMaximize" Height="20" >Disable Maximize</Button>
        <Button Name="EnableMaximize" Height="20" >Enable Maximize</Button>
        <Button Name="ShowIcon" Height="20" >Show Icon</Button>
        <Button Name="HideIcon" Height="20" >Hide Icon</Button>