Failed to host V3d_Viewer in WPF HwndHost.

Hi experts,

I am trying to replace the WinForm host in WPF sample by WPF HwndHost, but V3d_Viewer doesn't display in the expected WPF control.

I referenced this article to use HwndHost and my test project is attached.

To run the test project, follow the steps below:

  1. Open the solution in VS2022.
  2. Modify the property of project OCCTProxy to set correct OCCT paths.
  3. Set Target Framework to .NET 7 (I think other .NET version should also work) for project WpfHwndHost.
  4. Run the code and the result looks like below. OCCTProxy.InitViewer() finished without error. I'm using a Border control to host V3d_Viewer but it's empty.

Could someone confirm if this way is supported? If supported, what's wrong in my code? Thanks.

Attachments: