Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Assigning a window to HwndSource.Rootvisual throws an System.ExecutionEngineException

$
0
0

Hello,

we try to host a Window (in fact a class derived from Window) in a HwndSource.

When we assign the window object to the RootVisual member we get the System.ExecutionEngineException exception.

The code looks like this

HwndSourceParametershwsp =newHwndSourceParameters("blabla");

HwndSource = newHwndSource(hwsp);

Control = newMainControl(); // derived from Window

HwndSource.RootVisual = Control; // throws exception.

What's wrong with this code?

Thank you


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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