我有viewport3d,我想改变它的背景色。
我对Wpf非常陌生。我不知道其他帖子该怎么做。所以我在这里问。
我为viewport3d更改了画笔属性,但它什么也不做
<Window x:Class="W3DTinker.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="800" Width="1200">
<Grid HorizontalAlignment="Left" Height="780" Margin="10,10,0,-21" VerticalAlignment="Top" Width="1180">
<Viewport3D Grid.Row="0" Grid.Column="0" x:Name="Viewport" Margin="350,10,10,10" OpacityMask="{DynamicResource {x:Static SystemColors.AppWorkspaceBrushKey}}" />
</Grid>
发布于 2015-06-03 01:57:13
Viewport3D
是一个控件,它创建了一个3D场景,供您渲染。它本身不显示任何东西。如果您想要它后面的背景色,那么在它的父控件上设置背景色,在您的例子中,它是包含它的Grid
。
https://stackoverflow.com/questions/30608014
复制相似问题