发布网友 发布时间:2022-05-10 15:58
共2个回答
热心网友 时间:2023-10-14 18:59
外面套个Border是可以的,代码:
<Window x:Class="WpfApplication2.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid Margin="32">
<Border BorderBrush="Blue" BorderThickness="4">
<Image Source="/WpfApplication2;component/Images/Desert.jpg" />
</Border>
</Grid>
</Window>
截图:
按照你的代码定义Border的大小也没有问题,代码:
<Grid Margin="32">
<Border Height="100" Width="100" BorderBrush="Blue" BorderThickness="5">
<Image Source="/WpfApplication2;component/Images/Desert.jpg" />
</Border>
</Grid>
截图:
希望对你有帮助,有疑问请追问或是Hi
热心网友 时间:2023-10-14 19:00
<Border Width="100" Height="100" BorderBrush="Blue" BorderThickness="5">