With the advent of high-resolution monitors, it becomes very interesting to use vector images for the content of the buttons.
I've read an old forum thread when you said that we can set the content of the button to the vector image. It works weill for normal buttons but not for ribbon buttons: when the button is minimized, it disappeared! Surely because it is using the SmallIcon property, that is empty in this case.
Do you plan to introduce this feature in the near future?
4 Answers, 1 is accepted
Currently, there are no plans to introduce such feature. To achieve your requirement you can create a custom button that derives from RadRibbonButton. I prepared an example demonstrating such approach. I hope this helps.
Telerik by Progress
Thanks for the example code.
The problem I see is that it uses a custom template, So I need to:
- make a custom template for each theme I support.
- make the custom templates for RadRibbonButton, RadRibbonToggleButton, RadRibbonRadioButton, RadRibbonDropDownButton and RadRibbonSplitButton.
- check all this custom templates each time a new version of UI for WPF is out.
So this make 15 themes * 5 buttons, so 75 templates to make and check!!!!!
That's too much work for just this.
Don't forget that each developper that wants to implement this feature should also do the same. If Telerik corrects its code to support this, nobody else has to do this huge work.
I've corrected the references to the Telerik assemblies in the project and run it: the main window is empty.
The empty window is probably caused if the referenced Telerik assemblies are NoXaml. In this case you will also need to merge the resource dictionaries with the theme styles, and also define an implicit style for the custom button.
The approach in the project could be utilized for a code-behind scenario. In this case you won't need to create and maintain many styles (one for each theme). I updated my last project to demonstrate this. I hope it helps.
About your feedback, thank you for sharing this with us. We agree that the suggested approach is not very convenient. At this point, we won't be able to change the ribbon buttons current icon API to work also with WPF Path elements without introducing a breaking change for other users. However, we will consider some kind of new API that allows you to this.
Telerik by Progress