Forum Xamarin.Forms

Binding to variable.

I am making a custom view cell using c# (not xaml) and I would like to recover the value of an int in order to use it for changing the background color of the cells according to the value of the int. How can I do it?
I can recover the string for the labels with:
messageLabel.SetBinding(Label.TextProperty, new Binding("Text"));
But I can do it with an int with:
int type= Convert.ToInt32( new Binding("type").ToString());

Thanks.

Tagged:

Answers

Sign In or Register to comment.