Click here to Skip to main content
12,949,601 members (67,206 online)
Rate this:
Please Sign up or sign in to vote.
I want to develop to a wpf windows application in
I have a main window . in that i have a tabcontrol and i dynamically adding tab item like this
private void MnuDepartment_Click(object sender, RoutedEventArgs e)
            DepartmentMaster objDepartmentMaster = new DepartmentMaster();
            ClosableTabItem tabitem = new ClosableTabItem();
            tabitem.Header = objDepartmentMaster.Title;
            object childContent = objDepartmentMaster.Content;
            objDepartmentMaster.Content = null;
            tabitem.Content = childContent as UIElement;
            if (tabChild.Items.Count > 0)
                foreach (TabItem tab in tabChild.Items)
                    if (tab.Header.ToString().ToUpper() == tabitem.Header.ToString().ToUpper())
            tabChild.SelectedItem = tabitem;

I have some button in main screen for save ,delete

how can i call child window save function on save button click in parent window.

Ultimately i wanted to develop like mdi application in wpf.

suggest any other better way to achieve mdi in wpf.
Posted 19-Nov-12 17:44pm
First of all, don't call it MDI -- this is a bad word. What you do is not bad.
Also, there is no effective child-parent relationships between windows. Don't call those "child windows", they are FrameworkElements (for example, Panels), but not windows...

The problem itself seems artificial to me. You can expose any members of child elements. I cannot understand how it can make a difficulty. What did you try?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 5,489
CHill60 3,380
Maciej Los 2,913
Jochen Arndt 1,935
ppolymorphe 1,820

Advertise | Privacy | Mobile
Web01 | 2.8.170524.1 | Last Updated 19 Nov 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100