
I am looking for an example where TabControl, Prism and MEF are used.
I am interested how to dynamically add new tabs.
Could you please provide some example.
Thanks,
Mitja
12 Answers, 1 is accepted
Please examine the attached sample and let us know if it helps or if you need more info.
Best wishes,
Tina Stancheva
the Telerik team

Regards,
Mitja


I have the latest version of Telerik Silverlight test controls installed on my computer. I have used the update wizard on the project created from the .zip file, but when I try to run the app from VS, I get an error that tells me about having local copy true only for the MEF Extensions of the shell project. Since this is already the configuration, I don't know how to proceed from here to get the app to run.
Is this the right sample to use or should I be looking for something else? If it is the right sample, how do I resolve the error?
As I managed to understand you have a version conflicts when trying to run the project Tina previously posted here. If so, have you tried removing the MEF dlls from her project and use the ones installed on your machine? Is it possible for you to elaborate more on this, any snapshots would be highly appreciated.
Kind regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

With reference to my second question, is the referenced sample program a good fit for this requirement:
- On a master page, use a TabControl to present views. One TabItem per View.
- Lazy load modules on demand when a View within needs to be navigated to.
- When a Tab is closed, remove the view.
- Use MVVM and MEF.
- Use EF to interface with an existing SQL Database.
I think the project Tina referenced is a good starting point. However, I cannot say for sure that this is the best starting approach for your requirements. You can start implementing your scenario and we can assist you when you have issues or how-to questions with RadTabControl.
Kind regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Thanks
The project in this thread uses a RadTabControl so I assume you use similar project and RadRibbonBar/RadRibbonView. A quick note here - RadRibbonBar is obsolete now and it will be removed from our control suite in Q1 2013. We strongly suggest you to use RadRibbonView instead.
Usually, if you have a MainViewModel bound to RadTabControl / RadRibbonView you can have int property that is bound to the RibbonView's SelectedIndex property. Could this fit in your scenario? A command that sets a property from a ViewModel ?
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

You are correct, in my project I am using both the RadTabControl and the RadRibbonBar/RadRibbonView (In the process of migrating code). We currently are not using the MainModelView as the hub in the project and we think that may have been part of the issues when trying to connect to the modules from the Shell in the main project directly. Thank you for the help.
Best Regards,
Darryl
From your description I wasn't able to understand how you define the Ribbon control - is it also populated with items through module injections or is it defined in the ShellView. Also, I am not sure if you have a common ViewModel defined as the ShellView.DataContext.
This is why I modified the solution to demonstrate how you can take advantage of MEF and its mechanisms to load and activate views. I placed all my ShellView logic in code-behind but if your application uses a ViewModel, you can definitely place it in it. Please note that in order to implement this approach you'll have to define a RegionAdapter for the RadTabControl.
Take a look at the sample and let me know if it helps.
Regards,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Thank you for the example, it was excellent and explained the loading and activation of the views. We are using Unity, but could see the correlation in the example. We are having additional issues so I have opened a support item with a copy of our full project and a list of the questions we have. My question in this thread was answered, thank you to everyone for the support.
Regards,Darryl