我有一个Viewport3D,并希望更改其背景颜色。
我对Wpf非常陌生,我并不理解其他文章中的操作方法。因此,我在这里询问。
我更改了Viewport3D的brush属性,但没有任何效果。
<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>