Xamarin.Plugins
Xamarin.Plugins copied to clipboard
using DynamicResource in fontsize cause problem
When I use in IconLabel FontSize="{DynamicResource FontSize16}" base renderer after dynamic change of fontsize change FontFamily also, so OnElementPropertyChange is invoked but with e.PropertyName equals "Font" so method UpdateText in renederesrs is not called and FontFamily is not correct and after that all bad or none (only text) is shown in label
fix: add to renderers method OnElementPropertyChange:
switch (e.PropertyName) { case nameof(IconLabel.FontSize): case nameof(IconLabel.Text): case nameof(IconLabel.TextColor): case nameof(Font): UpdateText(); break; }