Search code examples
c#menubar

top menu bar creation


What I want to do is simply have a menu bar at the top of my game. The ones that have File, Edit, Help, Etc. If anyone knows how to do that, that would be great!


Solution

  • There is no built in control.

    You can make one like this:

    <DockPanel>
        <Menu DockPanel.Dock="Top">
            <MenuItem Header="_File">
                <MenuItem Header="_Open"/>
                <MenuItem Header="_Close"/>
                <MenuItem Header="_Save"/>
            </MenuItem>
            <MenuItem Header="_Edit">
            <MenuItem Header="_Help">
        </Menu>
    </DockPanel>