Quantcast
Channel: AvalonDock
Viewing all articles
Browse latest Browse all 2690

Commented Issue: Issue when Windows Form User Control gets hosted in WPF control in Avalon DockingManager. [15368]

$
0
0
Windows Form User Control gets hosted in WPF control in Avalon DockingManager. Then that WPF control gets hosted in regular windows form.
Everything gets built OK.
During the run time exception being thrown in Program.cs "object reference not set to an instant of the object".

static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); //<--exception is thrown here
}
}
Comments: ** Comment from web user: grettir **

Hi mach22,

Thank you so much for assisting with fixing that issue. I have updated dll for AvalonDock and it seems to make a trick with undocking.

With docking though it is a bit less predictable. You see, when the WPF control is undocked the only way to dock it back is to select option "Dock" from the menu of the WPF control, it just can't get docked when dragged back to the hosting form for some reason.

Not sure if it is easy thing to fix but if it is I would highly appreciate if you could take a look.

You are right, my scenario is unusual. But that because I have to deal with the situation when User Control was developed already and has lots of functionality in it, and also hosting form exists as well. So the only way for me to have AvalonDock workable is to host User Control in the WPF control, which is to host on the main form of the application.

Thanks!


Viewing all articles
Browse latest Browse all 2690

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>