当test.jpg大小超过Grid大小时就出现滚动条,请前辈指导下!先感谢了!
背景:下面一段代码是一个窗口里边放了一幅背景图片test.jpg。
问题:由于我的背景需发动态替换,所以想当test.jpg大小超过Grid大小时就出现滚动条,请前辈指导下!
<UserControl x:Class="LandQualityViewerApplication.AddIns.StatisticsResultWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit"
mc:Ignorable="d"
d:DesignHeight="411" d:DesignWidth="780">
<toolkit:BusyIndicator x:Name="StatisticsBusy">
<Grid Width="748" Height="322" Name="reportGrid">
<Grid.Background>
<ImageBrush Stretch="None" ImageSource="/taizi.AddIns;component/Images/test.jpg"/>
</Grid.Background>
</Grid>
</toolkit:BusyIndicator>
</UserControl>