R – WPF windows organization techniques

genericswindowswpf

Im developing some wpf app. Basically i have two types of windows: search windows and insert/edit windows. When i developed win forms apps, i used a trick, called MdiParent. In that way i had ability to put my caled search type windows in a "stack". In orher words if i called 5 different search windows from meniu, they apeared in a component like tab control, one after other.By clicking on that tabs, i could see search results of clicked tab window. The trick as i said was MdiParent technique, like:

    private ProductDiscount frmProductDiscount = null;

private void ProductDiscountToolStripMenuItem_Click(object sender, EventArgs e)
{

         if ((frmProductDiscount == null) || (!frmProductDiscount.Visible))
        {
            frmProductDiscount = new ProductDiscount();
            frmProductDiscount.MdiParent = this;
            frmProductDiscount.Show();
        }
        else
        {
            frmProductDiscount.Activate();
        }
    }

So does anyone can me suggest a good way to implement such a window organization technique in WPF and put some links or examples..?That would be a big help for me.

Best Answer

There is no equivalent of Form.MDIParent in WPF and MDI does not support the idea of an MDI layout. You can set a Windows Owner to another window. This will minimise the child when the parent is minimised.

For an example of MDI style functionality have a look at this thread link text where Marlon Grech has written something similar to what I believe you are trying to do.