Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Bind to button BackgroundColor

$
0
0

Hi,

Is it possible to bind to a buttons background color?

I have tried this. But wit no success.

var b = new Button
            {
                HeightRequest = 5,
                Text = item.Title,
                Font = Font.SystemFontOfSize(20, FontAttributes.Bold),
                HorizontalOptions = LayoutOptions.Start,
            };
            b.SetBinding(Button.BackgroundColorProperty, "StatusColor");

is it possible to bind the background color. And the text color of the button?


Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>