Hello,
I have a xamlDockManager > SplitPane > ContentPane in a wpf window.
I override the ToolWindowLoaded event of the xamlDockManager class to put some transparence when the ContentPane is in floating mode.
Using this code :
void xamDockManager1_ToolWindowLoaded(object sender, Infragistics.Windows.DockManager.Events.PaneToolWindowEventArgs e)
{
e.Window.UseOSNonClientArea = false;
e.Window.Opacity = 0.8;
}
Everything is fine but when I put a tag <WindowsFormsHost> in the ContentPane xaml code, all the ContentPane turns grey except the WindowsFormsHost which turns white.
It only happens when the pane is in floating mode, after calling the ToolWindowLoaded event.
There is no problem when the ContentPane is docked (because it doesnt try to put some opacity to the pane, I think).
Is this a bug ? Is there any way to solve it ?
(I'm using Infragistics For WPF 10.3)
If I understand the issue properly this is a limitation of the Hwnd interop. WindowsFormsHost don't support transparency - i.e. they can't be hosted in a window whose AllowsTransparency is false and they don't honor the transparency of the elements hosting them. You can get the same behavior outside of our controls and this isn't something we have any control over.
http://msdn.microsoft.com/en-us/library/aa970688.aspx
http://msdn.microsoft.com/en-us/library/ms751797.aspx
If you have a sample that shows something working when you host a WindowsFormsHost directly in a WPF window that doesn't work in our control the we can look into the matter.
Indeed, you're right.
After looking at your links and msdn forums, it's not possible to keep transparency when using a WindowsFormsHost in a WPF window.
My WindowsFormsHost was hosting an UltraGrid. To solve this problem, we'll have to transform our UltraGrid into a xamDataGrid.
It will take a lot of time of coding (because our UltraGrid is kind of complex) but it will gives us the opportunity to take advantage of the xamDataGrid performance and style.
Thank you for your answer.