F# Create the main window in XAML


You have to create a XAML file that defines the main window that contains our menu and drawing space. Here's the XAML code in MainWindow.xaml:

<!-- This defines the main window, with a menu and a canvas. Note that the Height
     and Width are overridden in code to be 2/3 the dimensions of the screen -->
    Title="Spirograph" Height="200" Width="300">
    <!-- Define a grid with 3 rows: Title bar, menu bar, and canvas. By default
         there is only one column -->
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        <!-- Define the menu entries -->
        <Menu  Grid.Row="0">
            <MenuItem Header="File">
                <MenuItem Header="Exit"
            <MenuItem Header="Spirograph">
                <MenuItem Header="Parameters..."
                <MenuItem Header="Draw"
            <MenuItem Header="Help">
                <MenuItem Header="About"
        <!-- This is a canvas for drawing on. If you don't specify the coordinates
             for Left and Top you will get NaN for those values -->
        <Canvas Grid.Row="1" Name="myCanvas" Left="0" Top="0">

Comments are usually not included in XAML files, which I think is a mistake. I've added some comments to all the XAML files in this project. I don't assert they are the best comments ever written, but they at least show how a comment should be formatted. Note that nested comments are not allowed in XAML.