3

I am creating an Application which will be a Tab based application having separate pages for each Tab. I want use RibbonTab as the Tab.

On selecting one RibbonTab corresponding UserControl will be loaded in the below section. Each RibbonTab and each UserControl should behave like a pair.

First Challenge - It would be easy to use single ViewModel for each RibbonTab-UserControl pair. But how to share single ViewwModel in to separate view.

Second Challenge - What is best way to implement this application

One Ribbontab and One UserControl is already ready. Waiting for how to associate those two.

Bijit
  • 105
  • 8
  • 1
    if it is easy to use single viewmodel for each tab - which is right - why would you complicate things ? however if you need to share/transfer data between viewmodels , you can use mvvmlight messenger class. – Musaab Nov 18 '11 at 07:47

1 Answers1

0

I'm not clear on the First challenge could you elaborate it please and I'll edit the answer.

As for the second challenge I highly recomend choosing a framework as that will make implementing MVVM a little easier Framework Comparison

I use a ContentControl and ResourceDictionary to determine what view to display based on the bound ViewModel as in this example. That technique could be used for the tab control as well here are a couple links on how to implement this:

Microsoft Tab Controled application Tutorial

Tab Control Binding

Community
  • 1
  • 1
Erick
  • 486
  • 2
  • 12
  • I programmed it out in pure MVVM. Check this: https://drive.google.com/file/d/1d2OckuDTLwnZ86p50Keyh_67zz2eWwFC/view?usp=sharing – MarkoW Apr 10 '21 at 18:42