# Other .NET Programming > Windows Presentation Foundation (WPF) & XAML forum >  RibbonMenuButton exec method?

## maingear

Hi!

Apparently there are many versions of the famous Ribbon out there. The one I am using is System.Windows.Controls.Ribbon with .NET 4.5.

My problem is that I can't find a way to make a simple RibbonMenuButton execute the simplest method that I have placed in the "behind-code". The RibbonWindow, Ribbon and RibbonMenuButton is in the xaml-code, and the method that I want to execute is in the C#-code, that's MainWindow.xaml and MainWindow.xaml.cs respectively.

I've tried to follow guides that propose using CommandBindings, but they seem to require a Command-property for the RibbonMenuButton - but in this version of .NET or Ribbon (haven't really understood which) this property is not available. I've even tried using the MouseLeftButtonUp-property, but that doesn't seem to work either.

There are also guides that seems to be for old versions of the Ribbon, before it was a part of WPF, where there were such things as RibbonCommand or something like that - but that also didn't work because those things doesn't exist in this version of either .NET or Ribbon.

I haven't posted any code samples here now, since I believe that it would complicate things. I will however if needed. =)

A guide or any clues that would work for me? Any help appreciated! =)

----------


## maingear

I found out that if I make the RibbonMenuButton into a RibbonButton instead, I could use either the Click-property for directly referring to a method, or the Command-property for using command bindings, none of which are available for RibbonMenuButton! I do still wonder how to use the RibbonMenuButton though!

----------

