NativeViewHost

Hello, I was previously experiencing a selected InputText being drawn on top of everything else. Looking at the forums, I found a solution using <NativeViewHost>. Seeing how this appears to solve all such problems I have been considering putting a substantial chunk of ux code, if not a whole app, inside a <NativeViewHost>.

As this is not done by default I would assume that there are some drawbacks to NativeViewHost. Thus, my question is, what may these downsides be?

Hi Jacob.

The downsides are that particular OpenGL effects (in particular, Blur and Shadow etc.) wouldn’t get rendered, unless you wrap them in GraphicsView. What GraphicsView does inside of a NativeViewHost is it creates an OpenGL canvas.

Other than that, everything else should work just fine.

Hope this helps!

To date having large UX trees inside NativeViewHost is not tested enough that we are pushing it as a replacement for OpenGL. We are also lacking some feature parity with our OpenGL implementation. I believe you will be fine in most cases, you just have to test and see if it works. Any bug reports are greatly appreciated.

Stuff not supported inside NativeViewHost
  • TextureImageSource and CameraView.PhotoCaptureImageSource
  • <Video />
  • ImageFill
  • 3D effects and transforms
  • Effects, for example Blur, DropShadow and Mask

Thank you both!