如果我将 viewport3D 放在 Canvas 中,我的 viewport3D 将不再可见。如果我删除 Canvas,那么 Viewport3D 将再次可见。我做错了什么?
<Canvas Width="900" Height="524">
<Viewport3D Name="mainViewport" ClipToBounds="True" HitTestVisible="False">
<Viewport3D.Camera>
<PerspectiveCamera
FarPlaneDistance="3500"
LookDirection="0,0,1"
UpDirection="0,1,0"
NearPlaneDistance="1"
Position="0,0,0"
FieldOfView="66" />
</Viewport3D.Camera>
<ModelVisual3D>
<ModelVisual3D.Content>
<AmbientLight Color="White" />
</ModelVisual3D.Content>
</ModelVisual3D>
</Viewport3D>
</Canvas>