index > Windows Presentation Foundation ("Avalon") > about WindowsFormsHost

about WindowsFormsHost

I use WindowsFormsHost to host a Windows.Forms.PictureBox control in a WPF application

I want to cover it with some other WPF controls( e.g. Image), but no control in WPF can appears in front of the WindowsFormsHost control.

Why? How?

Thank you!

Huson

You can't. This got me as well.

See http://windowssdk.msdn.microsoft.com/en-us/library/ms744952.aspx

Alan Painter
Plain and simple the WPF compositing engine and the Winforms (i.e. User32/GDI+) engine do things quite differently. Because of those differences (and also the fact that WPF has no control over whether a Winforms control is using DirectX or not), WPF controls and WinFormsHost can't exist in the same space....well they can but guess who's getting their Z-index sent to the back?


What's in your toolbelt? http://www.codeplex.com/Wiki/View.aspx?ProjectName=wpftoolbelt
ivolved_Mike_Brown
reply 3

You can use google to search for other answers

 

More Articles

• Question about the default window created in the WPF application....
• Example: DesktopSidebar Progress (built with July CTP)
• Binding and RichTextBox
• Doubt Regarding RichTextBox !!
• Why can't I freeze BitmapImage ?
• Harvesting the RSS Feeds from IE7
• Show page in new window with WBA
• Selecting .NET Framework 3.0 as prerequisite breaks Publish. Bug?
• OuterGlowBitmapEffect : Softness
• ListView GridLines
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• HostingWpfUserControlInWf example crashes
• XAML RSS Reader problem
• Help: RC1 ListView Memory Leak
• Code formatting on Forum
• WPF TextBox disable or handle paste
• Event and attached method
• XAML: setting BitmapImage.UriSource from
• Using jscript as code-behind with XAML
• About Window.AllowsTransparency......
• Return XPS document from a web service
• EID Slow when on two monitors
• Listview Editable
• DoubleClick on FrameworkElement
• Localization
• Creating Custom- / User-Controls - best

Hot Articles

• Keyboard.Focus() doesn't seem to be work
• Customising ListView
• How can I control the internal WebBrowse
• ControlTemplate.Storyboards
• export to image with black block
• Binding the TabItem Content
• scrolling contents in a stackpanel which
• Animating the Web content of Frame?
• HwndHost and Menu Items
• Show page in new window with WBA
• window allways on top
• Resize and reposition window smoothly
• Invalid attribute when attempting to bin
• Creating graphs using WPF
• Help needed Regarding the Grid and ListV

Recommend Articles

• How to add RichTextBox's content to Tex
• Textbox default contextmenu Style
• Bug Fixes
• BindingListCollectionView.CurrentChanged
• Storyboard pause behavior
• Animating a ListBox Scrolling Text with
• datbing listview with a generic sortedli
• FlowDocument, Inlines.CopyTo Question
• IsDisposed equivalent on WPF
• Mouse Position Relative to Desktop 0 0
• Creating a Hyperlink with Databound text
• Possible BlockCollection bug - Need clar
• one question on ComboBox databinding
• setting properties after animation was a
• Invalidate Layout