Your search did not match any results.


This demo illustrates how to display an icon within the Button widget. You can use a built-in or external font, or use an image as an icon.
<link rel="stylesheet" type="text/css" href="" /> <div id="demo"> <div class="dx-fieldset"> <div class="dx-field"> <div class="dx-field-label">Built-in icon</div> <div class="dx-field-value"> @( Html.DevExtreme().Button() .Icon("check") .Text("Done") .Type(ButtonType.Success) .OnClick(@<text> function (e) { DevExpress.ui.notify("The Done button was clicked"); } </text>) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Image icon</div> <div class="dx-field-value"> @( Html.DevExtreme().Button() .Icon(Url.Content("~/images/button/weather.png")) .Text("Weather") .ElementAttr(new Dictionary<string, object>() { { "class", "weather" } }) .OnClick(@<text> function (e) { DevExpress.ui.notify("The Weather button was clicked"); } </text>) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">External icon</div> <div class="dx-field-value"> @( Html.DevExtreme().Button() .Icon("fa fa-envelope-o") .Text("Send") .OnClick(@<text> function (e) { DevExpress.ui.notify("The Send button was clicked"); } </text>) ) </div> </div> <div class="dx-field"> <div class="dx-field-label">Icon only</div> <div class="dx-field-value"> @( Html.DevExtreme().Button() .Icon("plus") .OnClick(@<text> function (e) { DevExpress.ui.notify("The button was clicked"); } </text>) ) </div> </div> </div> </div>
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNetCore.Mvc; namespace DevExtreme.NETCore.Demos.Controllers { public class ButtonController : Controller { public ActionResult Icons() { return View(); } } }
.dx-fieldset { max-width: 400px; } .weather .dx-button-content { padding: 4px 12px; } .weather .dx-button-content .dx-icon { width: 30px; height: 30px; }