Forum Xamarin Xamarin.Forms

Possible to update global styles programatically?

CoderusXamarinOneCoderusXamarinOne USMember
edited August 2015 in Xamarin.Forms

Is it possible to update the values in global styles programatically?

I have some styles like:

<Style TargetType="Label">
    <Setter Property="FontSize" Value="25" />

And I wish to be able to change the value of the FontSize property in code. Doing so would ideally update all labels to use the new FontSize.

Does anyone know if this is possible and if so what would be the best approach?



  • ylemsoulylemsoul RUMember ✭✭✭
    edited August 2015

    Value is a bindable property. You can use markup({Binding}) syntax to bind it to something. Changes to it will reflect visuals too.

  • Oh okay, I will try that.

    Thank you!

Sign In or Register to comment.