I'm new to WPF. I've just been trying to put a menu bar and a grid object in a window, but I always get the exception that I am trying to set a content property more than once. I can't figure out how to put a menu along with other elements in the window.
Can someone please help me to get this right? Thanks.Code:<Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Eliptical Button"> <Menu IsMainMenu="True"> <MenuItem Header="File"> <MenuItem Header="New"/> <Separator/> <MenuItem Header="Open"/> <MenuItem Header="Save"/> <Separator/> <MenuItem Header="Save As..."/> <Separator/> <MenuItem Header="Exit"/> </MenuItem> <MenuItem Header="Edit"/> </Menu> <Grid> <Button/> </Grid> </Window>


Reply With Quote
Bookmarks