DockingManager: WinForms control not visible after state change

next problem

i have a custom control which hosts a winforms control on the left side and a contentpresenter on the right side to show different views depending what is selected on the left side. when i put this custom control into the docking manager and start dragging it, so it changes the state from dock to float, the winforms control gets invisible. but it is still there, so when i click at some point in this empty area the views get changed on the right side.

when the DockStateChanged event gets fired i tried to call UpdateLayout and InvalidateLayout for the manager and the sender (my custom control) but nothing happens.

2 Replies

RK Robert Koelz July 22, 2009 01:27 PM UTC

when i dock it back, the winforms control is visible again


BA Balavasanth Syncfusion Team July 22, 2009 01:56 PM UTC

Hi Rob,

Thanks for your interests in Syncfusion products.

In order to use WFH element in a WPF application, we need to set UseInteropCompatibilityMode property to true to make the Docking Manager to be compatible with the WFH. Kindly set UseInteropCompatibilityMode to True in your sample.

Make use of the code snippet for more idea.





syncfusion:DockingManager.SideInDockedMode='Left'>








Note:

Constraints in hosting a WFH in a WPF application

There are some complexity involved when a Windows Forms control is hosted in a WPF control. To explain this, we have a sample using the standard Microsoft WPF Controls with WFH in it. Following are the limitations of the WPF framework with a Windows Forms Host which is clearly explained in the sample.

• In a WPF application, when you add a Windows Forms Host control, it will always render at the top layer of the WPF element, which is the default behavior of the WPF Framework.

• WFH in WPF cannot display a transparent pop up.

• In the sample, MouseLeave event is raised for WPF border when we move the mouse over its child ( WFH )

• WFH doesn''t support animation;

• Doesn''t support routed events.

Please let me know if you have any questions.

Regards,
Bala.


Loader.
Up arrow icon