Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# WPF
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 19:43pm
Comments
Sergey Alexandrovich Kryukov at 28-Jun-13 0:48am
   
What is that beast, a WPF form? :-)
—SA

1 solution

Rate this: bad
good
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:
http://msdn.microsoft.com/en-us/library/ms745058.aspx[^],
http://msdn.microsoft.com/en-us/library/ms748828.aspx[^].
 
Good luck,
—SA
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 245
1 Kamal Rocks 184
2 Sergey Alexandrovich Kryukov 175
3 BillWoodruff 173
4 PIEBALDconsult 160
0 OriginalGriff 5,655
1 DamithSL 4,506
2 Maciej Los 3,997
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,180


Advertise | Privacy | Mobile
Web03 | 2.8.141216.1 | Last Updated 28 Jun 2013
Copyright © CodeProject, 1999-2014
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