Search code examples
c#iosxamarinxamarin-studio

How do I add an image button to an iOS storyboard in Xamarin Designer?


I'm building a shared project (iOS and Android targets) in Xamarin Studio. I want to add an image to the iOS storyboard and make that image into a button. In other words, I want to add button event functionality to an image.

I've found plenty of examples for doing this programmatically in c#.

But how do I accomplish this using the Xamarin Designer tools?

I've read all the Xamarin documentation I can find on images and buttons and performed a plethora of Google searches, but I can't find an answer.

I'm new to Xamarin, so go easy on me. :)


Solution

  • Hah, I found it. Add a button control to the storyboard, then open that button's properties panel. Scroll down and you'll see an Image property. If you've already added the image you want to your project's Resources folder, then you can easily select it from the Image dropdown.

    Button Control Properties panel