Viewport2DVisual3D The created frame is invisible

Hi everyone, I have a frame code as such

<Frame Name="wow" Width="1200" Height="600" ></Frame>

When I click on button, it loads it with the url as such

wow.Source=(new Uri("http://www.google.com"));

It works when I throw it in grid, it looks just fine, but when I drop it in the container viewport2dvisual3d, it does not appear.

  <Viewport2DVisual3D.Visual >
    <Grid Width="1200" Height="600" Name="frontPanel" Background="Blue">
      <Frame Name="wow" Width="1200" Height="600" ></Frame>            
        </Grid>                   
          </Viewport2DVisual3D.Visual>

framenot displayed. I see that my mouse changes the download symbol for a few seconds, but I still can’t see the frame.

This is mistake? or do I need to do something so that the frame appears in viewport2dvisual3dwhich is inside the 3d viewport?

+5
source share
1 answer

Until now, I see that you are missing Geometryboth Materialfor Viewport2DVisual3Dand Viewport2DVisual3D.IsVisualHostMaterialforMaterial

Viewport2DVisual3D

    <Viewport2DVisual3D>
        <Viewport2DVisual3D.Geometry>
            <MeshGeometry3D Positions="-1,1,0 -1,-1,0 1,-1,0 1,1,0"
                            TextureCoordinates="0,0 0,1 1,1 1,0"
                            TriangleIndices="0 1 2 0 2 3" />
        </Viewport2DVisual3D.Geometry>
        <Viewport2DVisual3D.Material>
            <DiffuseMaterial Viewport2DVisual3D.IsVisualHostMaterial="True" />
        </Viewport2DVisual3D.Material>
            <Grid Width="1200" Height="600" Name="frontPanel" Background="Blue">
               <Frame Name="wow" Width="1200" Height="600" ></Frame>
            </Grid>
    </Viewport2DVisual3D>
0

All Articles