开发者

WPF: The correct way to make a standard menu

I've just started out fiddling with WPF in Expression Blend and now I'm trying to design a "normal Windows GUI" interface with a menu at the very top and some other stuff which takes up the rest of the window.

Which panel do I use to make the menu always stay at the very top, take up only as much height as it needs to fit the menu items and fill the entire width of the 开发者_运维知识库window, in such a way that I can just fill in other panels and what-not in the rest of the window?


    <DockPanel LastChildFill="True">
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="Foo" />
        </Menu>

        <!-- Use whatever panel you want here -->            
        <StackPanel>
            <TextBlock Text="Bar" />
        </StackPanel>
    </DockPanel>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜