protected override void OnParentSet() { base.OnParentSet(); BindingContext = Parent; _icon.SetBinding(Image.SourceProperty, "CurrentIcon"); _text.SetBinding(Label.TextProperty, "Text"); _text.SetBinding(Label.TextColorProperty, "CurrentTextColor"); _text.SetBinding(Label.FontSizeProperty, "CurrentFontSize"); _text.SetBinding(Label.FontAttributesProperty, "CurrentFontAttributes"); _badge.SetBinding(BadgeView.BackgroundColorProperty, "CurrentBadgeBackgroundColor"); _badge.SetBinding(BadgeView.TextProperty, "BadgeText"); _badge.SetBinding(BadgeView.TextColorProperty, "BadgeTextColor"); }
protected override void OnParentSet() { base.OnParentSet(); BindingContext = Parent; _icon.SetBinding(Image.SourceProperty, "CurrentIcon"); _text.SetBinding(Label.TextProperty, "Text", BindingMode.OneWay, new ToUpperConverter()); _text.SetBinding(Label.TextColorProperty, "CurrentTextColor"); _text.SetBinding(Label.FontSizeProperty, "CurrentFontSize"); _text.SetBinding(Label.FontAttributesProperty, "CurrentFontAttributes"); _text.SetBinding(Label.FontFamilyProperty, "CurrentFontFamily"); _badge.SetBinding(BadgeView.BackgroundColorProperty, "CurrentBadgeBackgroundColor"); _badge.SetBinding(BadgeView.TextProperty, "BadgeText"); _badge.SetBinding(BadgeView.TextColorProperty, "BadgeTextColor"); VisualFeedbackEffect.SetFeedbackColor(this, Color.White); }