in WPF

WPF Ribbon – ApplicationSplitMenuItem

If you have started working on the newly released WPF Ribbon, you would have noticed that you can use ApplicationMenuItem and ApplicationSplitMenuItem to create menus. What is the basic difference between them?

To start with, let me show you via some screenshots:

Below is an ApplicationMenuItem

image

And, below is an ApplicationSplitMenuItem

image

As the name suggests, it adds a split functionality with it’s submenu. The parent ApplicationSplitMenuItem responds to commands whereas the parent ApplicationMenuItem does not. I think it again drills down to which one to use based on your application requirements, but Office 2007 can be taken as an excellent example to compare the usage.

Below is the code snippet to create Application Split Menu

<r:RibbonApplicationSplitMenuItem>    <r:RibbonApplicationSplitMenuItem.Command>        <r:RibbonCommand             LabelTitle="Menu"            LargeImageSource="images/windows.png"            Executed="RibbonCommand_Executed_14"/>    </r:RibbonApplicationSplitMenuItem.Command>    <r:RibbonApplicationSplitMenuItem>        <r:RibbonApplicationMenuItem.Command>            <r:RibbonCommand LabelTitle="Submenu 1"                              LargeImageSource="imagesfavorites-large.png"                             Executed="RibbonCommand_Executed_15"/>        </r:RibbonApplicationMenuItem.Command>    </r:RibbonApplicationSplitMenuItem>    <r:RibbonApplicationSplitMenuItem>        <r:RibbonApplicationMenuItem.Command>            <r:RibbonCommand LabelTitle="Submenu 2"                             LargeImageSource="imagesfavorites-large.png"                             Executed="RibbonCommand_Executed_16"/>        </r:RibbonApplicationMenuItem.Command>    </r:RibbonApplicationSplitMenuItem>    <r:RibbonApplicationSplitMenuItem>        <r:RibbonApplicationMenuItem.Command>            <r:RibbonCommand LabelTitle="Submenu 3"                             LargeImageSource="imagesfavorites-large.png"                             Executed="RibbonCommand_Executed_17"/>        </r:RibbonApplicationMenuItem.Command>    </r:RibbonApplicationSplitMenuItem></r:RibbonApplicationSplitMenuItem>

Write a Comment

Comment

Time limit is exhausted. Please reload the CAPTCHA.