标签:sheet red 包含 art graphic 包括 css pos children
原文:WPF中CAD control的XAML实现
??? 下面这个XAML文件是cad control里面最重要的一部分,使用Grid包含Viewport,Viewport中包括Camera和model。
??? 我以前和以后的关于WPF CAD的例子都是基于这个模板的,所以把这个文件单独放在一个文章里面,看其他文章遇到的话可以来查阅XAML的结构和一些Name。
?
??? <Grid? x:Name="CadGrid" ClipToBounds="True">?
??????? <Viewport3D Name="ViewPort"?>
??????????? <Viewport3D.Camera>
??????????????? <OrthographicCamera x:Name="camera" Position="0,0,12" LookDirection="0,0,-1"/>
??????????? </Viewport3D.Camera>
??????????? <Viewport3D.Children>
??????????????? <ModelVisual3D>
??????????????????? <ModelVisual3D.Content>
??????????????????????? <Model3DGroup>
??????????????????????????? <AmbientLight x:Name="AmbientLight" Color="Black" />
??????????????????????????? <DirectionalLight x:Name="Headlight"? Color="White"? />
??????????????????????? </Model3DGroup>
??????????????????? </ModelVisual3D.Content>
??????????????? </ModelVisual3D>
??????????????? <ModelVisual3D x:Name="CAD3DModel" />
??????????????? <local:xyz3DAxis x:Name="Axis3D" Visibility="Hidden" Color="Red"? />
??????????? </Viewport3D.Children>
??????? </Viewport3D>
??? </Grid>
标签:sheet red 包含 art graphic 包括 css pos children
原文地址:https://www.cnblogs.com/lonelyxmas/p/9844936.html