NativeViewHost within Viewport

Hi Fuser Crew,

Got a bug report here on NativeViewHost not positioning properly when contained inside Viewport for Builds. Local Preview works perfectly, no problems. But when build the app displays incorrectly.

Snapshots =

Preview:

Android Build:

*Note: Test Case uploaded to https://www.dropbox.com/request/ZgndLtJQm5eGzG9cicGK for the team along with Build for faster reproduction.

Update =

Code for Issue:

<App>
    <ClientPanel>
        <Grid Columns="1*,1*">
            <Viewport Perspective="1000">
                        <Panel HitTestMode="LocalBoundsAndChildren" Height="40" Background="#F0F0F0">
                            <NativeViewHost>
                                <Text Value="Text One" FontSize="13" Alignment="Center"/>
                            </NativeViewHost>
                        </Panel>
            </Viewport>

            <Viewport Perspective="750">
                <Panel HitTestMode="LocalBoundsAndChildren" Height="40" Background="#F0F0F0">
                            <NativeViewHost>
                                <Text Value="Text Two" FontSize="13" Alignment="Center"/>
                            </NativeViewHost>
                        </Panel>
                    </Viewport>
        </Grid>
    </ClientPanel>
</App>

Fuse Version = v.0.25.1
OS = Windows 10
Bug Occurs = For Export on Android

Thank you.

Cheers,

Elizabeth

Hi,

Can you please post the associated code with this issue?

NativeViewHost is not expected to behave correctly under 3D-transformation.

Hi Anders,

Thread post has been updated to include code.

NativeViewHost is not expected to behave correctly under 3D-transformation.

Is there any workaround for this that’ll allow me to have NativeViewHost behave correctly under 3D-transformation?
Would this be possible in the future?

Thanks.

Cheers,

Elizabeth

You can use <NativeViewHost RenderToTexture="true" /> to make it display correclty under a 3D-transform, but that disables interaction with the view.

The problem is that Android simply does not support 3D-transforms for views. iOS sort of does, but so far this is not exposed and exploring this has not been a priority.