ItemsSource and ItemsTemplate property for RadPaneGroup

5 posts, 0 answers
  1. Syam
    Syam avatar
    13 posts
    Member since:
    Aug 2011

    Posted 01 Nov 2011 Link to this post


    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 
  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 01 Nov 2011 Link to this post

    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 >>

  3. DevCraft banner
  4. Syam
    Syam avatar
    13 posts
    Member since:
    Aug 2011

    Posted 01 Nov 2011 Link to this post

    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
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 02 Nov 2011 Link to this post

    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 >>

  6. Syam
    Syam avatar
    13 posts
    Member since:
    Aug 2011

    Posted 02 Nov 2011 Link to this post

    Thanks Miroslav

    Syam
Back to Top
DevCraft banner