2 posts, 0 answers
  1. Gary
    Gary avatar
    4 posts
    Member since:
    Jan 2013

    Posted 04 Apr 2013 Link to this post


    What is the best practices for the following situation?

    1) I have a MainWindow / Menu / MenuItemA
        I click MenuItem and want another window to display say [EditWindow].

    2) from [EditWindow] i want to click /Contextmenu/MenuItemB and open yet another form [AnotherEditWindow]

    Does Telerik provide some type of messaging system, mediator pattern?

    How should this be coded to MVVM standards, I've read the MenuItemB.Command executes on MainWIndowViewModel, raising an event that
    MainWIndow has subscribed too. In code behind i create EditWIndow.

    Same for EditWindow, MenuItemB.Command executes on EditWindowViewModel, raising an event that EditWindow has subscribed too, and creates AnotherEditWindow.


    just use routedEvents to code behind and create new windows like Winforms development?


    Use some framework?


  2. Ivo
    Ivo avatar
    390 posts

    Posted 10 Apr 2013 Link to this post

    Hi Gary,

    I believe the approach you described with commands is a great solutions for this case. It is MVVM friendly, simple and doesn't require lots of code. Another possible solution that you might prefer is to use delegates instead of events into your ViewModel. This way your code will be even more straightforward.
    Currently there is nothing specific provided by Telerik for this, because it can be handled using the WPF framework with ease.

    Kind regards,
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top