简体   繁体   中英

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. :)

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.

按钮控件属性面板

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM