Dims
Dims

Reputation: 51219

Multiple controls on Xamarin button?

I would like complex button, which has several text elements and which should change their state and color depending on button state.

Unfortunately, I see that Xamarin button has only predefined image and text parameters.

How to have multiple controls inside a button in Xamarin?

Upvotes: 0

Views: 143

Answers (2)

Muhammad Abu Mandor
Muhammad Abu Mandor

Reputation: 295

I think you must read more in content view, where you can add labels into stacklayout or grid with your own api bindable property, then use it wherever you want in your code:
https://learn.microsoft.com/en-us/dotnet/api/xamarin.forms.contentview

Upvotes: 0

sermet
sermet

Reputation: 442

Visual state manager(Only XF 3.0+) have three states: normal, disabled, focused which is named "CommonStates", or you can create custom states.Maybe it could help:

https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/visual-state-manager

Upvotes: 1

Related Questions