Binding to regions

6 posts, 0 answers
  1. João Araújo
    João Araújo avatar
    1 posts
    Member since:
    Dec 2009

    Posted 25 Jan 2010 Link to this post

    Hi,

    I'm developing a prism silverlight application, using the view-model approach, and I'm trying to use the RadPanelBar and bind it's content to a region manager so that we show one region in each radpanelitem. My main question is : is it possible? If it is can you give some guidelines on how to do the region binding.

    Thanks
  2. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 26 Jan 2010 Link to this post

    Hi João,

    Yes, it is possible to use the PanelBar control in a Prism-based application. The only thing that may be specific to the PanelBar is that you may want to provide some custom styling for the second-level items that will wrap the content that will be injected in your regions. Other than that, it should be as simple as this:

    <telerikNavigation:RadPanelBar>
        <telerikNavigation:RadPanelBarItem Header="Inbox">
            <ContentControl prism:RegionManager.RegionName="InboxRegion" />
        </telerikNavigation:RadPanelBarItem>
    </telerikNavigation:RadPanelBar>

    You could also go for an alternative approach and bind the PanelBar's ItemsSource to a collection of ContentControls or ItemsControls depending on your requirements. With the alternative you will avoid hard coding the PanelBar items in XAML - this will be useful if the number of regions you want to define is determined at runtime.

    All the best,
    Tihomir Petkov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft banner
  4. Mark Shaw
    Mark Shaw avatar
    11 posts
    Member since:
    Feb 2010

    Posted 01 Mar 2010 Link to this post

    Does anyone have a proper example of this? Been at this a while and can't quite get things right.
  5. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 02 Mar 2010 Link to this post

    Hi Mark,

    Since you didn't describe your exact scenario, I am attaching a generic sample that demonstrates how to use the PanelBar control in a Prism application. Please take a look at it and let me know if I can help with something else.

    Best wishes,
    Tihomir Petkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. Mark Shaw
    Mark Shaw avatar
    11 posts
    Member since:
    Feb 2010

    Posted 02 Mar 2010 Link to this post

    This is close. Sorry. Duplicate Post







  7. Tihomir Petkov
    Admin
    Tihomir Petkov avatar
    576 posts

    Posted 02 Mar 2010 Link to this post

    Hi Mark,

    OK, I am closing this thread.

    Kind regards,
    Tihomir Petkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
DevCraft banner