Thanks for using Syncfusion products.
We would like to let you know that to apply icon to the buttons in the ribbon control use properties “PrefixIcon” and “SuffixIcon” . Please refer the below Code snippets,
<ej:ContentGroup Id="undo" Text="Undo" ToolTip="Undo" IsBig="false">
<ButtonSettings ContentType="TextAndImage" ImagePosition="ImageTop" PrefixIcon="e-ribbon e-undo" Click="executeAction" Type="Button" />
</ej:ContentGroup>
<ej:ContentGroup Id="upDown" Text="Up & Down" ToolTip="Up & Down">
<ButtonSettings ContentType="ImageTextImage" PrefixIcon="e-upimg" SuffixIcon="e-downimg" Click="executeAction" Type="Button" Width="120" />
</ej:ContentGroup>
To put an URL on the content attribute refer the below format and the link,
.e-ribbon .e-new:before {
content: url('../images/arrow2.png');
font-size: 36px;
position: relative;
left: -12px;
top: -4px;
}
Link: http://stackoverflow.com/questions/946403/insert-image-after-each-list-item
Please find the below sample for your reference.
Sample: http://www.syncfusion.com/downloads/support/forum/119116/RibbonButtonIcons-1351014312.zip
Please let us know if you need any further assistance.
Regards,
Sarath Kumar P.
Hi Rakotondrabesa,
Thanks for your update.
Please let us know if you need any assistance.
Regards,
Sarath Kumar P.
and how can i add a url to a button
[cshtml]
<ButtonSettings Type="Button" ContentType="ImageOnly" ImagePosition="ImageTop" PrefixIcon="e-icon e-ribbon e-new" Click="executeAction" />
[script]
function executeAction(args) {
if (args.model.text == "New") {
window.open("https://www.syncfusion.com/", "_blank")
}
} |