c# - Change ViewModel when selecting Ribbon Tab -


i absolute newbie realm of wpf , mvvm. little know has made me want dig deeper. sounds exciting!

i working fluent ribbon control http://fluent.codeplex.com/. each ribbon tab has associated view , viewmodel. change using selectedtabchanged event gets fired on selecting tab. addeditems collection of selectionchangedeventargs has name of new tab can use in code behind class done.

i know if possible without implementing code behind. tried attach dependency object event can attached command in view model. failed @ last instance since seems fluent ribbon doesnt derive depedencyobject.

thanking in advance thoughts , views.

are adding tabs dynamically @ runtime, or defining them in xaml?

if defining them in xaml, need have main viewmodel, main window, holds instances of viewmodels different tabs. these should exposed properties, can bind datacontext of each tab.

if there 'selected item', 'selected tab' or such property on ribbon, can bind 'currenttab' property in main vm, if need know tab selected.


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -