Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Icon not displayed for RibbonMenuItem

I have the following code inside a RibbonSplitButton (which rendered correctly on the 3.5 ribbon CTP verion). I tried to view it using the WPF Ribbon 4.0 library, but it's just not rendering the Icon. Any idea why?

<ribbon:RibbonMenuItem Header="Option 3 - icon">
                            <ribbon:RibbonMenuItem.Icon>
                                <Image Width="16" Height="16" Source="Images/wizard-icon16.png"></Image>
                            </ribbon:RibbonMenuItem.Icon>
                        </ribbon:RibbonMenuItem>
like image 442
melculetz Avatar asked Mar 02 '11 01:03

melculetz


2 Answers

Don't use the Icon property, that is inherited from MenuItem, and isn't used by the Ribbon control. Use the ImageSource property instead.

like image 122
Mark Avatar answered Sep 17 '22 23:09

Mark


I also see the same problem. I've try to put even simple text in the Icon property but it just does not show anything. I've check the control template and there is just no binding to the Icon property in it. You can use ImageSource to put an image in the menu item icon's place.

I guess it simply bad control template.

like image 20
Ido Ran Avatar answered Sep 17 '22 23:09

Ido Ran