Click here to Skip to main content
13,049,263 members (68,104 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Hello Friends,

Am facing a problem of displaying a form desined in one assembly file to be get displayed in another wpf form created in another class assembly.

I have created a an assembly called ,say Class1 and creted an wpf view design in it,say Form1.
Now i have an assembly say called Class2, and have a wpf vew desin in that too, Form2.

What i need here is, i need to bring the Form1 in assembly Class1 to the Form2 in assembly Class 2.

Here, in the form created in Class 2, I have a grid containing values, and i want the form from class1 assembly to get displayed on to the right side of the grid with the help of a GridSplitter control.

Now am done with splitting the grid, But i havent got a method to make the form in Classs1 to get displyed here in Form2.

Please Hep me out to solve this Problem..
Posted 27-Jun-13 18:43pm
What is that beast, a WPF form? :-)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question. Windows in WPF are called windows not forms, the are derived from the class System.Windows.Window.

Those windows are designed to be top-level Window windows, not children of anything except a desktop. Even though you can use a dirty raw Windows API trick to make one a child of another, you should never do it, this would be a great UI abuse. There are numerous legitimate ways to organize a set of nice hierarchical container UI elements, which would be different kinds of panels, tab controls, and the like. This is matter of regular design work to decide which UI elements to use and how to organize the layout and their collaboration.

To start with, you need to learn WPF Layout Model:[^],[^].

Good luck,

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

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 28 Jun 2013
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