To clarify others, here is how to use above code. CommandReference class is created for you, when you create a new WPF Model-View Application. To have that project type you would need to install the MVVM template toolkit, which you can download here WPF Model-View-ViewModel Toolkit
<Window.Resources>
<commands:CommandReference x:Key="WelcomePageCommandReference" Command="{Binding WelcomePageCommand}"/>
<commands:RibbonCommandEx x:Key="RibbonWelcomePageCommand"
DelegatedCommand="{StaticResource WelcomePageCommandReference}"
LabelTitle="{x:Static properties:Resources.RSTR_WelcomePage}"
LabelDescription="{x:Static properties:Resources.RSTR_WelcomePageDescription}"
SmallImageSource="/Resources/Images/WelcomePage.png"
LargeImageSource="/Resources/Images/WelcomePage.png"
ToolTipImageSource="/Resources/Images/WelcomePage.png"
ToolTipTitle="{x:Static properties:Resources.RSTR_WelcomePage}"
ToolTipDescription="{x:Static properties:Resources.RSTR_WelcomePageDescription}"/>
</Window.Resources>
.
.
.
<r:Ribbon.ApplicationMenu>
<r:RibbonApplicationMenu Command="{StaticResource RibbonWelcomePageCommand}">
</r:RibbonApplicationMenu>
</r:Ribbon.ApplicationMenu>
<r:Ribbon.ApplicationMenu>
<r:RibbonApplicationMenu Command="{StaticResource RibbonExitCommand}">
<r:RibbonApplicationMenuItem Command="{StaticResource RibbonExitCommand}">
</r:RibbonApplicationMenuItem>
</r:RibbonApplicationMenu>
</r:Ribbon.ApplicationMenu>
.
.
.
My 2 cents.