Neelam Prajapati
Neelam Prajapati

Reputation: 3802

button with 2 images and text in xamarin forms

I am trying to create a button with two images on it. One at left side and one at right side and text in center. After searching I got a button with image only so I wanted to know if it is posible to create a button as I described above in xamarin?

I am trying to create button like this and also I want to change arrow image on the button click to up arrow and down arrow. Is it posible in xamarin to create button like this or should I think about another option any idea?

enter image description here

Upvotes: 0

Views: 1556

Answers (1)

Rohit Vipin Mathews
Rohit Vipin Mathews

Reputation: 11787

You can't directly do this with the Button from Xamarin Forms as it doesn't support images yet.

From your requirement what you can do is create a horizontal stacklayout and add the images and a label to it. Also set a background color so that it would look like a button. To make it work like a button, add a Gesture recognizer to the stack layout and add the tap gesture. You can handle the event for tapping or bind it via command if you are using MVVM.

Upvotes: 0

Related Questions