Wpf 让StackPanel';当有';没有足够的空间

Wpf 让StackPanel';当有';没有足够的空间,wpf,Wpf,我有一个简单的WPF应用程序,它定义为 <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel Grid.Row="0" Orientation="Horizontal" > <

我有一个简单的WPF应用程序,它定义为

     <Grid.RowDefinitions>
        <RowDefinition Height="Auto" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>

    <StackPanel Grid.Row="0"  Orientation="Horizontal" >
        <Label Content="Date" Margin="5,0,0,0"/>
       <DatePickerTextBox ></DatePickerTextBox>
        <DatePickerTextBox ></DatePickerTextBox>
        <DatePickerTextBox ></DatePickerTextBox>

        <Button Margin="15,0,0,0" Content="Click me"  Height="25"  />
    </StackPanel>

    <Grid Background="Aqua" Grid.Row="1"></Grid>
    </Grid>

(请不要考虑它的意义,它是复制我在实际应用程序中面临的问题的模型)

它显示为

当我调整大小时,它显示为


我希望stackpanel的项目向下浮动,以便继续看到所有项目,这可能吗?怎么做?

正如@Rise在评论中所说,在这种情况下,正确使用的面板是包装面板,而不是堆叠面板。可以找到不同面板类型的详细概述

使用wrappanel而不是stackpanel