Reputation: 31
There is an application which consists or two parts - WPF user interface and C++ dll with math and Opengl graphics. The WPF user interface has WindowsFormsHost with a Windows Forms Label in it. The handle of the label is used to draw graphics using Opengl.
Now the application should be made cross-platform. Avalonia is a good choice as a user interface part, but unfortunately I did not managed to find if it is possible to embed a window with native handle in an Avalonia window?
Is there something like WindowsFormsHost of WPF or another control?
Upvotes: 2
Views: 1859
Reputation: 31
I have found the solution:
var piHandle = base.CreateNativeControlCore(parent);
//this is the handle
m_Handle = piHandle.Handle;
As the result a window with the handle m_Handle will be created.
Upvotes: 1