Binding to FontAttributesProperty

Hi,
I want to bind to the FontAttributesProperty of a button
I have tried the following

var btn = new Button() { Text = item.Title, TextColor = Color.Black, HeightRequest = 40, }; btn.SetBinding(Label.FontAttributesProperty, "FontStyle");

But with no result.

How can I do this?
Do I have to make a custom binding?

Br Morten

Tagged:

Answers

  • EllenKEllenK USMember ✭✭

    You have to change

    Label.FontAttributesProperty

    to

    Button.FontAttributesProperty

Sign In or Register to comment.