I’m using the http://wpfmdi.codeplex.com/ library to handle MDI in my WPF application.
I’ve got a Canvas which contains a child container, which in turn contains a number of small windows.
I would like to disable the titlebar on my child windows. Is this possible? I haven’t found a single property which achieves this, especially since the MdiChild object is of type Control rather than Window.
This is my code for creating an MDIChild, which contains an object of my TableWindow class.
MdiChild child = new MdiChild()
{
MaximizeBox = false,
MinimizeBox = false,
Resizable = true,
ShowIcon = false,
Content = tableWindow.Content as UIElement
};
mainContainer.Children.Add(child);
EDIT:

Since its a
Controlso you have tooverrideits default template (ControlTemplate).In source code you will see two xamls –
Aero.xamlandLuna.xamlcontaining the style for MdiChild control. Source code can be seen here. Just get rid ofStackPanel(ButtonsPanel)containing buttons andGrid(HeaderContent).Thats the power WPF gives us, you can customize any control to give it a look whatever you feel like by overriding its
ControlTemplate.EDIT
To override the template you have to redefine it in your xaml. What you have to do is
create a style again in your Window resources, set the template for the controland it will automatically override the default control template. Simply copy paste the entire template from here and remove the StackPanel and Grid which i mentioned above.EDIT2
Replace your
ControlTemplatewith this to disable the title bar but still enable the drag operation and resizable operation for your control –