用户控件停靠到底部

时间:2012-05-02 20:46:13

标签: wpf

我遇到了停靠面板的问题,没有将我的usercontrl对接到底部。任何人都可以帮我弄清楚为什么这不会对接到底部?

    <StackPanel>
<DockPanel Name="dockPanel" HorizontalAlignment="Stretch">
            <StackPanel DockPanel.Dock="Bottom" HorizontalAlignment="Stretch">
                <uc:UserControl HorizontalAlignment="Stretch" Margin="0,30,0,0" Background="White" Width="Auto" Height="Auto" />
            </StackPanel>
        </DockPanel>
    </StackPanel>

1 个答案:

答案 0 :(得分:2)

StackPanelDockPanel替换为Grid,或将DockPanel移至表单的主Grid