开发者

Adjusting width between image and label in RibbonMenuItem

I'm having some difficulty with styling the RibbonMenuButton in Micr开发者_JAVA技巧osoft Ribbon for WPF (October 2010).

Is there any way in which I can access the property for the width between the image and the label? I can't find any relevant member on the MSDN Property List, and as expected, adjusting the padding just changes the spacing between the entire button and it's container.

<ribbon:RibbonMenuButton SmallImageSource="/MyProject;component/Images/Foo.png" Label=Bar">
    ...
</ribbon:RibbonMenuButton>

Thanks in advance!


That will likely have to be done through the template. For template manipulation, I typically use Expression Blend as it allows easier access to the template and provides design time display of an example of the item being templated. If you don't have it, pick up a trial.

If you do get it, load your solution into Blend, right-click on an item you want to change the template for, selected Edit Template > Edit a Copy...

The template will be copied, referenced by the item, and you can then edit it to suit the look and feel you want for the control.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜