使用WPF时使用将viewport3D放在canvas和dockPanel下无法显示

jenny_zhang 2009-01-16 02:46:40
使用Wpf布局时,对于viewPort3D可以直接放在window下,也可以grid的布局放在Grid下,但是放在canvs和dockPanel下面时什么也显示不出来,这是什么原因,请高手多多指教。
...全文
159 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
cgp2008 2010-12-06
  • 打赏
  • 举报
回复
看一看 是如何说的
LorenLiu 2009-01-31
  • 打赏
  • 举报
回复
你需要设定一下ViewPort3D的宽和高

When this control is included as the content of a layout element like Canvas, specify the size of the Viewport3D by setting its Height and Width properties (inherited from FrameworkElement).

来源msdn:http://msdn.microsoft.com/en-us/library/system.windows.controls.viewport3d.aspx

111,130

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧