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

PanelBar and MVVM

2 Answers 82 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 13 May 2014, 12:19 AM
Hello everyone.

I am playing around with MVVM (leveraging Prism and Unity), but I am somewhat stuck on how to bind my modules to a PanelBar properly. What I want to do is set the ItemHeader text to the name of whatever module I am loading (at design time, I don't know how many modules will be loaded), and then have the Items (Views) be displayed under that.  Graphically it would look something like this:

################    PanelBar    ############### 
================Module 1 Text=============== //ItemHeader
---------------------------- View     1 Text--------------------------- //Item
---------------------------- View     2 Text--------------------------- //Item
---------------------------- View     3 Text--------------------------- //Item
================Module 3 Text=============== //ItemHeader
---------------------------- View     1 Text--------------------------- //Item
---------------------------- View     2 Text--------------------------- //Item
########################################## 

I know (basically) how to get 'View X Text' to display through the use of a ViewModel, but I am not sure about getting the ItemHeader set properly.  Any help that you can provide would be greatly appreciated!

Thanks.

2 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 15 May 2014, 03:58 PM
Hi Doug,

I prepared a sample project for you in which the names of the Prism Modules are set to be Headers of the root level PanelBarItems. I hope this is what you need to achieve or at least you can get some ideas from this project. 

Regards,
Petar Mladenov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Doug
Top achievements
Rank 1
answered on 17 May 2014, 12:01 AM
Petar,

This is exactly what I was looking for.  Thanks!

-Doug
Tags
PanelBar
Asked by
Doug
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Doug
Top achievements
Rank 1
Share this question
or