Problem configuring Ribbon's Split Button (Office UI)

Aug 21, 2009 at 6:45 AM
Edited Aug 21, 2009 at 6:47 AM

I am tryting to configure Ribbon's SplitButton. Following is my markup:


                    <r:RibbonSplitButton x:Name="btnQuickSearch" Command="{StaticResource rcmdQuickSearchBtn}">
<r:RibbonButton x:Name="btnTitleSearch" Command="{StaticResource rcmdTitleSearchBtn}" />
<r:RibbonSeparator />
<r:RibbonButton />

I am having 2 problems here:
1) What items should I put in the SplitButton's Items collection?? When I put RibbonLabel, they are NOT clickable. On putting RibbonButton, the list does not collapse when any button is clicked.
Neither could I find any Method on SplitButton to collapse it manually in an Event handler.
2) I do not want any Image in the Dropdown list of Buttons in the SplitButton. However, setting IsImageVisible on the Button's SizeDefinition gives an Exception saying Images are required on Large Ribbon items.

Please help. My questions regarding the Office UI are not being answered. Neither is there any documentation available.


Aug 21, 2009 at 6:14 PM

Hi r_honey,

RibbonSplitButton is design to take RibbonMenuItems or standard MenuItems, not other RibbonControls, like so:

 <r:RibbonSplitButton Command="{StaticResource myCommand}">
        <r:RibbonMenuItem Command="{StaticResource myCommand1}"/>
        <r:RibbonMenuItem Command="{StaticResource myCommand2}"/>
        <r:RibbonMenuItem Command="{StaticResource myCommand3}"/>
        <MenuItem Header="MenuItem1"/>


Aug 23, 2009 at 6:31 AM

Thanx Samantha. That worked. I never tried RibbonMenuItem. The Items collection in RibbonSplitButton accepts any Object. It would have been
useful if it was of a specific type making it ealier to figure out what actually needs to be put there.

It would be useful if you can take time out and answer my other thread related to Office UI: