Reputation: 1971
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>
Upvotes: 7
Views: 1637
Reputation: 1894
Don't use the Icon property, that is inherited from MenuItem
, and isn't used by the Ribbon control. Use the ImageSource
property instead.
Upvotes: 7
Reputation: 11424
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.
Upvotes: 4
Reputation: 3363
Add a forward slash in front of Images and do a Rebuild Solution. This is assuming the Images directory is located at the root of your project.
Is the image's build action set to Content?
HTH
Upvotes: 0