João Araújo
Top achievements
Rank 1
João Araújo
asked on 25 Jan 2010, 08:03 PM
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
5 Answers, 1 is accepted
0
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.
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.
0
Mark Shaw
Top achievements
Rank 1
answered on 01 Mar 2010, 06:56 PM
Does anyone have a proper example of this? Been at this a while and can't quite get things right.
0
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.
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.
0
Mark Shaw
Top achievements
Rank 1
answered on 02 Mar 2010, 04:19 PM
0
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.
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.