0

如何使 StackPanel 具有底部边框和厚度为 1?

我已经尝试了几种方法,其中一种在下面,但我没有尝试过任何方法(包括我在 SO 上找到的一些答案):

    <Border BorderBrush="#FF1986D1" BorderThickness="1" VerticalAlignment="Bottom">
        <StackPanel Background="#FFC6E1EE" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="13">


        </StackPanel>            
    </Border>
4

1 回答 1

9

我想到了:

<Window x:Class=".MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="" Height="558" Width="328">
    <Grid>
        <Border BorderBrush="#FF1986D1" BorderThickness="0 0 0 1" VerticalAlignment="Top">
            <StackPanel Background="#FFC6E1EE" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="113">

            </StackPanel>            
        </Border>
    </Grid>
</Window>
于 2013-10-06T07:23:50.870 回答