Mert Akcakaya
Mert Akcakaya

Reputation: 3129

WPF Ribbon and ViewModel

I am trying to switch from TabControl to Ribbon.

When using TabControl, I bound my UserControl's to TabItem.Content. It was enough to load my user controls while switching between tab items.

Now with WPF Ribbon controls, I will have RibbonButton. How should I load my user control with it? Should I handle a Click() event or what?

Upvotes: 0

Views: 1300

Answers (1)

N_tro_P
N_tro_P

Reputation: 693

AFAIK the ribbon control is used primarily with in a RibbonWindow. This means your top level window must change to that type. You can then bind the RibbonWindow ribbon's (that you make with in the window) content to your user control.

Here is the MSDN. http://msdn.microsoft.com/en-us/library/system.windows.controls.ribbon.ribbon%28v=vs.110%29.aspx

As you can see they use the ribbon control with in the RibbonWindow. I know this was a requirement before and I did not think it would change considering it is an entirely different layout than a traditional window.

Upvotes: 1

Related Questions