We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

custom image for button

I would like to use my own images for the ej button control.  How can I do this?  thank you

2 Replies

SN Sasikala Nagarajan Syncfusion Team May 10, 2017 09:59 AM UTC

Hi Lawrence,   
  
Thanks for contacting Syncfusion support.  
  
We can achieve your requirement with help of existing property of button PrefixIconSuffixIcon. By setting e-icon class following with your image class name to this API, can get the required images with button control. Please refer the below code example   
  
     @Html.EJ().Button("button").ContentType(ContentType.ImageOnly).PrefixIcon("e-icon preImage").SuffixIcon("suffixImage").Size(ButtonSize.Mini)   
.preImage {   
        background-imageurl('../../Content/Email.png');   
        background-size:24px;   
    }   

 
 
Also, this property supports the built icon library which is available in EJ themes. To know more about this please refer the below link   
  
  
Regards,   
Sasikala Nagarajan   



PN Preethi Nesakkan Gnanadurai Syncfusion Team May 11, 2017 04:07 AM UTC

From: lawrence.greenberg@judicialdialog.com [mailto:lawrence.greenberg@judicialdialog.com]
Sent: Wednesday, May 10, 2017 9:28 AM
To: Syncfusion Support <support@syncfusion.com>
Subject: RE: Syncfusion support community forum 130375, custom image for button, has been updated.
 

Sasikala, 
thank you for your valuable help. 


Loader.
Up arrow icon