In response to WPF overview-Part-I, one of my friends and a .Net enthusiast herself, requested for details on ElementHost Class of WPF (this class gave her nightmares in not getting the Children attached to it).
This might be true for many other developers who are specialized in Web Applications and have lesser exposure to windows development. As a breather to all those folks, I am here exploring this class with sincere hopes that it will provide a good insight to the class.
ElementHost as described in MSDN is “a Windows Forms control that can be used to host a Windows Presentation Foundation (WPF) element” is located under System.Windows.Forms.Integration namespace.
The members of this class have details available at this location.
Why is this Class used?
ElementHost control is used to place a WPF UIElement on to the Windows Forms control or form. In simple words, if a developer is using the traditional Windows forms and intends to use WPF controls, this control (class) is used to host them.
Likewise, while using WPF if the need is to use some Windows controls, the WindowsFormsHost element is available.
An example would be nice here, however better would be a walkthrough that is available here.
Hope this was useful,
Till Next we connect……………….
Happy Coding.
This might be true for many other developers who are specialized in Web Applications and have lesser exposure to windows development. As a breather to all those folks, I am here exploring this class with sincere hopes that it will provide a good insight to the class.
ElementHost as described in MSDN is “a Windows Forms control that can be used to host a Windows Presentation Foundation (WPF) element” is located under System.Windows.Forms.Integration namespace.
The members of this class have details available at this location.
Why is this Class used?
ElementHost control is used to place a WPF UIElement on to the Windows Forms control or form. In simple words, if a developer is using the traditional Windows forms and intends to use WPF controls, this control (class) is used to host them.
Likewise, while using WPF if the need is to use some Windows controls, the WindowsFormsHost element is available.
An example would be nice here, however better would be a walkthrough that is available here.
Hope this was useful,
Till Next we connect……………….
Happy Coding.
Comments
Post a Comment