Scrollviewer隐藏了我的以下控件 [英] Scrollviewer hides my following controls

查看:123
本文介绍了Scrollviewer隐藏了我的以下控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

所以这是我的代码:

Hello!

So here is my code:

<DockPanel>
        <ScrollViewer DockPanel.Dock="Top" VerticalScrollBarVisibility="Auto">
            <StackPanel>
                <ListBox Name="MixControl" ScrollViewer.HorizontalScrollBarVisibility="Disabled" HorizontalAlignment="Stretch" ItemContainerStyle="{StaticResource StretchedContainerStyle}" ItemTemplate="{StaticResource MixListBoxItemTemplate}"/>
            </StackPanel>
        </ScrollViewer>
        <Expander DockPanel.Dock="Bottom" VerticalAlignment="Bottom" IsExpanded="True">
            <DockPanel>
                <TextBlock Text="Login:"></TextBlock>
                <TextBox></TextBox>
                <TextBlock Text="Password:"></TextBlock>
                <PasswordBox></PasswordBox>
            </DockPanel>
        </Expander>
    </DockPanel>



我想实现在Windows底部始终可见一个带".上面应该是Scrollviewer,在需要时显示滚动条.

但是,如果显示了滚动条,则我的底部Dockpanel将被Scrollviewer隐藏".如何实现扩展器的始终可见性?



I want to achieve to have a "band" on the bottom of my Window always visable. Above should be the Scrollviewer, showing the scrollbar when nessecary.

But if the scrollbar is shown, my bottom Dockpanel gets "hidden" by the Scrollviewer. What can I do to achieve always visability for my Expander?

Thanks!

推荐答案

感谢johannesnestler的解决方案:

>>啊,现在我可以更改停靠的顺序,以使LastChildFill使用ScrollViewer,然后不必设置Dock属性.
Thanks to johannesnestler for this solution:

>>Ah, now I see you could just change the order of the docking so that LastChildFill uses the ScrollViewer, then you don''t have to set the Dock property.


这篇关于Scrollviewer隐藏了我的以下控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆