Call methods from ViewModel

2 posts, 0 answers
  1. Eric
    Eric avatar
    57 posts
    Member since:
    Aug 2012

    Posted 21 Mar 2014 Link to this post

    Let's suppose I have a RadPaneGroup in a WPF view.

    Now I want to do this:   

    var x = new RadPane();


    This must be done in the ViewModel NOT code behind.

    How do we accomplish that?
  2. Vladi
    Vladi avatar
    743 posts

    Posted 24 Mar 2014 Link to this post

    Hello Eric,

    In order to achieve this scenario in a MVVM friendly approach you can take advantage of the PanesSource property of the control and its DockingPanesFactory. You can create a custom DockingPanesFactory and override its AddPane method in which you can implement a custom logic that adds each RadPane to a specific RadPaneGroup.

    You can take a look at this help article that describes in more details how the PanesSource and DockingPanesFactory could be used. Hope this is helpful.


    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

  3. DevCraft banner
Back to Top