I am struggling on what event to subscribe to and how to design a project based around the outlook bar and prism.
So far I have the main shell with 2 regions: One which holds the OutlookBar and ...
the Main Region
I have modules which include Views for the outlookbar; The view is a RadOutlookBarItem
and views for the main region.
The Outlook Views all load correctly, but I am at a loss as to how to "wireup" these such that when the outlookbar items are selected the appropriate view is displayed in the Main Region.
I'm guessing the ViewModel for the main program should do something like (from the samples)
then call something on this which is translated back within the OutlookBarItems View Model??
like newSelecteditem.IsSelected = true; ???
Then I'm not really sure of the code to display that view (which was previously registered with the "MainRegion"?)
any help either links or gentle pushes greatly appreciated
TIA
Michael
So far I have the main shell with 2 regions: One which holds the OutlookBar and ...
the Main Region
I have modules which include Views for the outlookbar; The view is a RadOutlookBarItem
and views for the main region.
The Outlook Views all load correctly, but I am at a loss as to how to "wireup" these such that when the outlookbar items are selected the appropriate view is displayed in the Main Region.
I'm guessing the ViewModel for the main program should do something like (from the samples)
RadOutlookBarItem newSelectedItem = (sender
as
RadOutlookBar).SelectedItem
as
RadOutlookBarItem;
then call something on this which is translated back within the OutlookBarItems View Model??
like newSelecteditem.IsSelected = true; ???
Then I'm not really sure of the code to display that view (which was previously registered with the "MainRegion"?)
any help either links or gentle pushes greatly appreciated
TIA
Michael
8 Answers, 1 is accepted
0
Hello Michael,
If I understand your scenario correctly, you need to implement a master/detail scenario using PRISM. If this is indeed the case, you can check this article illustrating a possible solution. I hope it will help you.
Let us know how it goes.
Kind regards,
Tina Stancheva
the Telerik team
If I understand your scenario correctly, you need to implement a master/detail scenario using PRISM. If this is indeed the case, you can check this article illustrating a possible solution. I hope it will help you.
Let us know how it goes.
Kind regards,
Tina Stancheva
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
Michael
Top achievements
Rank 1
answered on 08 Feb 2011, 12:45 PM
Sorry this reply has taken so long in getting back, but no that doesn't reflect my scenario.
I have multiple modules which each register a RadOutlookBarItem in the outlook bar "region". Each module also contains a view for the "mainregion" which should be displayed as that module's outlookbaritem is selected. (Within the outlookbaritem I might then have a parent child relationship or filter the results some way, but of the modules "main" view.
I figure it must all be tied up with the outlookbar selectionchanged event, although I've also read about the INavigationAware interface and perhaps the viewmodel for each outlookbaritem should implement this and trigger the mainview once the "outlookBarItem" view is navigated to?
In my preliminary dabbling with this I have run into the problem of trying to add multiple instances of views to a region (the region is a radpane and i think i've also read about the navigation behaving differently for single view components and multi view?)
I have multiple modules which each register a RadOutlookBarItem in the outlook bar "region". Each module also contains a view for the "mainregion" which should be displayed as that module's outlookbaritem is selected. (Within the outlookbaritem I might then have a parent child relationship or filter the results some way, but of the modules "main" view.
I figure it must all be tied up with the outlookbar selectionchanged event, although I've also read about the INavigationAware interface and perhaps the viewmodel for each outlookbaritem should implement this and trigger the mainview once the "outlookBarItem" view is navigated to?
In my preliminary dabbling with this I have run into the problem of trying to add multiple instances of views to a region (the region is a radpane and i think i've also read about the navigation behaving differently for single view components and multi view?)
0
Hello Michael,
Please accept my apology for the delayed response. I prepared a sample project that illustrates a possible approach towards your scenario. I data bound the IsSelected property of the RadOutlookBarItem and used it to activate the MainRegion views. I hope it will help you get started on your task.
Please have a look at the project and let me know if it works for you or if you need more info.
Kind regards,
Tina Stancheva
the Telerik team
Please accept my apology for the delayed response. I prepared a sample project that illustrates a possible approach towards your scenario. I data bound the IsSelected property of the RadOutlookBarItem and used it to activate the MainRegion views. I hope it will help you get started on your task.
Please have a look at the project and let me know if it works for you or if you need more info.
Kind regards,
Tina Stancheva
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Brew Hutch
Top achievements
Rank 1
answered on 12 Jun 2014, 07:52 PM
Hi Tina,
I use your sample and It works fine with Telerik dlls 2011.1.0419.40, but when I upgrade dlls to 2013.3.1016, the rad menu is collapsed at start up. Would you please advise what's missing?
Thanks,
Brew
I use your sample and It works fine with Telerik dlls 2011.1.0419.40, but when I upgrade dlls to 2013.3.1016, the rad menu is collapsed at start up. Would you please advise what's missing?
Thanks,
Brew
0
Hello,
I am not sure why your application crashes but it seems that the RadOutlokBarItems are not populated. I created a project using our latest official release and PRISM 4.1 to build it and it seems that the code works as expected.
Please take a look at the attached application and let me know if it works for you. Please note that the ActiveItemsCount property of the RadOutlookBar control is set.
Regards,
Pavel R. Pavlov
Telerik
I am not sure why your application crashes but it seems that the RadOutlokBarItems are not populated. I created a project using our latest official release and PRISM 4.1 to build it and it seems that the code works as expected.
Please take a look at the attached application and let me know if it works for you. Please note that the ActiveItemsCount property of the RadOutlookBar control is set.
Regards,
Pavel R. Pavlov
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
Brew Hutch
Top achievements
Rank 1
answered on 17 Jun 2014, 09:07 PM
ActiveItemsCount does a trick. If I set it to 99 for example, would it cause any problem?
0
Hello,
This property controls the maximum number of items that can be visualized under the horizontal splitter. If you set it to 99 the RadOutlookBar will try to fit 99 items there and the items will be moved to the Minimized area if their count exceed 99. This will force the control to reduce (or completely remove) the area of the SelectedContent with every item added. The usual setting of this property is up to 10.
I hope this information will help you decide if you actually need to set the ActiveItemsCount property to such big number of items.
Regards,
Pavel R. Pavlov
Telerik
This property controls the maximum number of items that can be visualized under the horizontal splitter. If you set it to 99 the RadOutlookBar will try to fit 99 items there and the items will be moved to the Minimized area if their count exceed 99. This will force the control to reduce (or completely remove) the area of the SelectedContent with every item added. The usual setting of this property is up to 10.
I hope this information will help you decide if you actually need to set the ActiveItemsCount property to such big number of items.
Regards,
Pavel R. Pavlov
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
Brew Hutch
Top achievements
Rank 1
answered on 20 Jun 2014, 01:34 PM
Thank you Pavel for info.