void UpdateTextColor() { Color textColor = Element.TextColor; BrushHelpers.UpdateColor(textColor, ref _textDefaultBrush, () => Control.Foreground, brush => Control.Foreground = brush); BrushHelpers.UpdateColor(textColor, ref _defaultTextColorFocusBrush, () => Control.ForegroundFocusBrush, brush => Control.ForegroundFocusBrush = brush); }
void UpdatePlaceholderColor() { Color placeholderColor = Element.PlaceholderColor; BrushHelpers.UpdateColor(placeholderColor, ref _placeholderDefaultBrush, () => Control.PlaceholderForegroundBrush, brush => Control.PlaceholderForegroundBrush = brush); BrushHelpers.UpdateColor(placeholderColor, ref _defaultPlaceholderColorFocusBrush, () => Control.PlaceholderForegroundFocusBrush, brush => Control.PlaceholderForegroundFocusBrush = brush); }
protected override void UpdateBackgroundColor() { base.UpdateBackgroundColor(); if (Control == null) { return; } // By default some platforms have alternate default background colors when focused BrushHelpers.UpdateColor(Element.BackgroundColor, ref _backgroundColorFocusedDefaultBrush, () => Control.BackgroundFocusBrush, brush => Control.BackgroundFocusBrush = brush); }