This is a migrated thread and some comments may be shown as answers.

Call methods from ViewModel

1 Answer 47 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 21 Mar 2014, 01:40 PM
Let's suppose I have a RadPaneGroup in a WPF view.

Now I want to do this:   

var x = new RadPane();

myRadPaneGroup.AddItem(x);

This must be done in the ViewModel NOT code behind.

How do we accomplish that?

1 Answer, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 24 Mar 2014, 10:00 AM
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.

Regards,
Vladi
Telerik
 

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.

 
Tags
General Discussions
Asked by
Eric
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Share this question
or