Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I set a button background image on iPhone under Monotouch?

How can I set a button background image on iPhone under Monotouch? It will be better if you provide me same sample. Thanks.

like image 385
Noro Avatar asked May 02 '11 08:05

Noro


1 Answers

This will set a background image on a button:

button.SetBackgroundImage (UIImage.FromBundle ("imageFile"), UIControlState.Normal);

You can set different images for different control states with the UIControlState parameter.

like image 66
Dimitris Tavlikos Avatar answered Sep 19 '22 00:09

Dimitris Tavlikos