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
close icon

How to use bitmap as image in buttonadv

Is it possible to use a bitmap as button image instead of using imageurl?

4 Replies

VR Varalakshmi R.S Syncfusion Team November 29, 2012 11:53 AM UTC

Hi Ochieng,

 

Thanks for contacting Syncfusion forums.

 

We suggest you to set image to the class “.button” which commonly sets the background image for all the  buttons in the page or apply the style to the specific button using its id.  Please refer the below code snippet to achieve this,

<code>

[CSS]

.button

{

background-image:url("../../../Content/Images/background.png");

}

// ‘OfficeButton1’ refers the id of the button control

#OfficeButton1_OUB

{

background-image:url("../../../Content/Images/background.png");

}

</code>

Kindly try the above solution.

 

Regards,

Varalakshmi



OC Ochieng December 4, 2012 07:32 AM UTC

Hallo ,
my problem is i am making a screenshot and intend to use that as the button image. The buttons are being created dynamically and the image is stored in the databank as a blob. At runtime the image will be accessed using a memorystream and converted to a bitmap therefore i cannot access it using URL.


OC Ochieng December 5, 2012 01:26 PM UTC

my problem is i am making a screenshot and intend to use that as the button image. The buttons are being

created dynamically and the image is stored in the databank as a blob. At runtime the image will be accessed

 using a memorystream and converted to a bitmap therefore i cannot access it using URL.

I have attached part of the code to show where my button would implement the button image


code part_634b90d9.zip


VR Varalakshmi R.S Syncfusion Team December 6, 2012 08:45 AM UTC

Hi Ochieng,

 

We regret to let you know that this requirement cannot be done with our current implementation. Bitmap images cannot be set directly as background for the Button. You need to store the image in your local folder and should load it using its url.

 

Regards,

Varalakshmi


Loader.
Live Chat Icon For mobile
Up arrow icon