我使用 C# 和 WPF 构建我的项目。在我的应用程序中,我使用了一个小尺寸的图像(25x25)作为我的应用程序背景。我从互联网上找到了一些示例,当我尝试时,我的应用程序的背景就像 imageA。但我想做的是我的背景就像 imageB。有谁知道如何使它像imageB?
我的 WPF 代码片段:
<Grid>
<Grid.Background>
<VisualBrush TileMode="Tile" Viewport="0.8,0.8,0.1,0.1" AlignmentX="Left" AlignmentY="Top">
<VisualBrush.Visual>
<Image Source="/Wpf_Customer;component/bg.jpg"></Image>
</VisualBrush.Visual>
</VisualBrush>
</Grid.Background>
<RadioButton Content="Graph" Name="dsad" FontSize="15" ></RadioButton>
</Grid>
图片A:
图B:
编辑:
图像C: