Menu & CM, how do I use correctly?

Dec 5, 2011 at 9:55 AM


I've a main view model called WorkSpaceViewModel that uses RadDocking from telerik with the DockManager implemented by a user I don't remember the name (as I find it I'll publish), I wish to have a fixed menu in the top of my application then the docking below...

Here's my XAML


  <Grid x:Name="LayoutRoot"
            <RowDefinition Height="30"/>
            <RowDefinition Height="*" />
        <local:MenuView Grid.Row="0" cal:View.Model="{Binding Menu}"></local:MenuView>
        <!--<StackPanel Orientation="Horizontal" Grid.Row="0" >
            <telerik:RadMenu x:Name="Menu">
                <telerik:RadMenuItem Header="first menu item"></telerik:RadMenuItem>
                <telerik:RadMenuItem Header="second menu item"></telerik:RadMenuItem>
        <telerik:RadDocking Grid.Row="1">

                <telerik:RadSplitContainer ItemsSource="{Binding ModuleRadPaneGroups}">

MenuView is a simple View/ViewModel I created to load the menu items from the DB but for now I point to have a dummy method that generates...

Here starts the question :


  1. Is ok to create a view/viewmodel for the menu instead of a <telerik:RadMenuItem .....> directly in the WorkSpaceViewModel?
  2. I think I should attach a cal:Message.Attach to intecept the click on the item and then process it, is it ok?
  3. To open a new view in the DockManager I use for now this :
       protected override void OnViewLoaded(object view)
    what should I do next, call a method that has a view name an activate the model doing ActivateItem(string) ?
  4. If my application got 30 different view, should I declare each property in the WorkSpaceViewModel ? is there an efficent way?

Excuse me for all this question but I don't want to start with the wrong footstep...