I'm learning to create a wpf application with menuitems and when on clicking the menu item a new form / a group of textbox and button, should appear below.
Mainwindow.xaml: This is the window where menuitems to be placed
<TabItem Header="IB Review Information">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<uc:IBReview />
</Grid>
</TabItem>
usercontrol.xaml(uc:IBReview): This is the menuitem usercontrol which has menu data. This usercontrol will be place under the mainwindow.xaml
<Grid>
<DockPanel>
<Menu DockPanel.Dock="Top">
<MenuItem Header="_File">
<MenuItem Header="_Exit" />
</MenuItem>
<MenuItem Header="_Tools">
<MenuItem Header="_Manage users">
</MenuItem>
<MenuItem Header="_Show groups" IsCheckable="True" IsChecked="True" />
</MenuItem>
</Menu>
</DockPanel>
<Grid>
Now i have constructed window with menuitem. After this I dont know how to construct a form like application under each menuitem. I don't know whether to use page, window or usercontrol.
I tried to constuct a form using usercontrol but when i tried to load into the mainwindow but it's not working correctly
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Text="claimid" />
<TextBox Grid.Row="1" Grid.Column="2" Width="50" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Text="ram"/>
<TextBox Grid.Column="2" Width="50" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Height="50" Text="ram"/>
<TextBlock Grid.Row="0" Text="claimdata" />
</Grid>
1) what is the correct approach whether to use a new window,page or usercontrol on menu item click?
2) I'm trying to achieve this in mvvm, any link or simple example is highly appreciated. I'm completely clueless on how to achieve this.