microsoft / WPFDXInterop

Repo for WPF DX Interop support
MIT License
307 stars 98 forks source link

RequestRender not firing the DoRender callback #28

Closed RemyTheRat1 closed 7 years ago

RemyTheRat1 commented 7 years ago

When I use the D3D11Image control inside a Window directly, everything works fine. Calling the RequestRender method causes the DoRender callback to fire. However, if I use the D3D11Image control in a UserControl instead of a Window (the UserControl is in the Window), calling the RequestRender method will not cause the DoRender callback to fire.

Aside from moving to using a UserControl, all the code is the same between the two cases. Has anyone run into this before or gotten it to work from within a UserControl? I thought maybe the window handle for the D3D11Image was wrong but I verified it is correct.

RemyTheRat1 commented 7 years ago

For anyone who runs into a similar problem, I solved my issue. I was not setting the pixelsize properly when using the usercontrol.