/// <summary> /// Updates the fore color based on the selection. /// </summary> private void UpdateForecolor() { // If control exists if (this.Control != null) { var element = (PickerEx)this.Element; var color = this.Control.SelectedIndex >= 0 ? element.TextColor : element.PlaceholderColor; this.Control.Foreground = PickerExRenderer.ColorToBrush(color); } }
/// <summary> /// Sets the text color for the current control. /// </summary> private void UpdateTextColor() { this.Control.Foreground = PickerExRenderer.ColorToBrush(((PickerEx)this.Element).TextColor); }