问题描述
我正在寻找一种方法,让 UserControl
填充每一行,而不会在行尾留出空白区域。
那是我的WrapPanel
:
<ScrollViewer VerticalAlignment="Stretch" Margin="100,315,100,0" VerticalScrollBarVisibility="Auto" >
<WrapPanel>
<Border Margin="10,10,0" Width="200" Height="200" CornerRadius="15,15,15" BorderThickness="1,1,1" BorderBrush="#FF0A5952" Background="#7F95D4C3" MouseEnter="Border_MouseEnter" MouseLeave="Border_MouseLeave" Cursor="Hand" MouseDown="Border_Coran_MouseDown">
<Grid >
<Image Source="/tile_quran.png" Margin="5,5,15"></Image>
<Label Content="Coran" HorizontalAlignment="Center" VerticalAlignment="Bottom" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" FontFamily="Verdana" FontSize="18" Foreground="#FF524E44"/>
</Grid>
</Border>
</WrapPanel>
</ScrollViewer>
有人知道怎么做吗?
P.S.:窗口可以调整大小,因此每次调整窗口大小以完美适合每一行时都需要更改。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)