2、DockPanel

DockPanel-- docked panels, internal control or container may be placed in upper, lower, left and right

Internal elements (control containers) in order of appearance is important, the final appearance will fill the remaining space (this element is not set alignment, width and height)

Left, after the appearance of an upper portion of the DockPanel TextBox filled. The right is TextBox first appearance after appearance StackPanel effect.

  

<DockPanel>
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button Content="确定" Margin="5"/>
            <Button Content="取消" Margin="5"/>
        </StackPanel>
        <TextBox DockPanel.Dock="Top" Text="1234"/>
</DockPanel>

 

Guess you like

Origin www.cnblogs.com/xixixing/p/10962661.html