Including WPF Components
-
I used to do it but now I completely forgot :-O So, how do you include say a
StackPanel
in your C# Windows Application form?? Many thanks:rose:
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
jamie550 wrote:
Put it inside a ElementHost control.
What, how where :-O Please clarify :-O
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
Put a ElementHost on your form. If it is called host, then you would do: StackPanel s=new StackPanel(); host.Child=s; s.Children.Add( first control you want); s.Children.Add( second control); etc...
Sorry but doh! :doh: :-O What are all these?? Where can I find this mighty ElementHost, what is it?? is it a control?? and how can I access those wpf controls by simply type their names?? I cant just type StackPanel, do I need to reference some class/interface first?? what is it?? Hey, thanks mate!
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
Sorry but doh! :doh: :-O What are all these?? Where can I find this mighty ElementHost, what is it?? is it a control?? and how can I access those wpf controls by simply type their names?? I cant just type StackPanel, do I need to reference some class/interface first?? what is it?? Hey, thanks mate!
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
The ElementHost is a control. It it located in WindowsFormIntegration.dll StackPanel and most other WPF controls are in PresentationFramework.dll, but you also need PresentationCore.dll and WindowsBase.dll
-
I used to do it but now I completely forgot :-O So, how do you include say a
StackPanel
in your C# Windows Application form?? Many thanks:rose:
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
Thanx jamie but all the dlls you just mentioned are disabled and cant be imported:( What do I do now :sigh:
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
Thanx jamie but all the dlls you just mentioned are disabled and cant be imported:( What do I do now :sigh:
All generalizations are wrong, including this one! (\ /) (O.o) (><)
-
Are you targeting at least .NET Framework 3.0? There should be a tooltip describing the problem.
-
ElementHost class is supported in .net faramework 3.5, 3.0 sp1, 3.0 here is the msdn link about this class : http://msdn.microsoft.com/en-us/library/system.windows.forms.integration.elementhost.aspx[^]
sometimes 0 can be 1
-
Are you targeting at least .NET Framework 3.0? There should be a tooltip describing the problem.
You're patience is astonishing, and pleased he thanked you for you effort.
Never underestimate the power of human stupidity RAH