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

ItemsSource and ItemsTemplate property for RadPaneGroup

4 Answers 229 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Syam
Top achievements
Rank 1
Syam asked on 01 Nov 2011, 09:43 AM

I have a requirement in my project where in I need to bind a collection of RadPane's into a RadPaneGroup. I am aware that RadPaneGroup doesn't support the properties ItemsSource and ItemsTemplate. But is there a way to work around it?

I am using MVVM pattern for development, so I can't directly add a RadPane instance into a collection of RadPane's in the ViewModel of my view. Also I don't want to have a Prism region on my RadPaneGroup.

I am using Silverlight 4 and RadControls for Silverlight Q2 2011.

Any help is appreciated.

Thanks in Advance

Syam 

4 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 01 Nov 2011, 12:15 PM
Hello Syam,

We created a sample that demonstrates how to work-around this limiatation using attached properties. You can download the example and find more information about it in this thread.

Hope this helps.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Syam
Top achievements
Rank 1
answered on 01 Nov 2011, 02:44 PM
Hi Miroslav,

First of all, thanks for your reply. I tried the method that you suggested. But in the work around, you instantiate a RadPane and use a collection of RadPanes in your ViewModel. This method breaks the MVVM pattern (my requirement) as we are using a View or Control (RadPane) in the ViewModel. As per MVVM, your ViewModel should not be aware of any View. Hope you understood my concern.

Thanks

Syam
0
Miroslav Nedyalkov
Telerik team
answered on 02 Nov 2011, 09:35 AM
Hi Syam,

As I mentioned in my previous post this is a simplified example and just demonstrates the idea - you can get the code and extend it however you like - for example you can extend the PaneGroupExtensions to use source of ViewModels and generate the panes on demand. We don't have an example for this.

Hope this helps.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Syam
Top achievements
Rank 1
answered on 02 Nov 2011, 09:38 AM
Thanks Miroslav

Syam
Tags
Docking
Asked by
Syam
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Syam
Top achievements
Rank 1
Share this question
or