Browse Source

RichTextBoxFormatBar: fixed bug when setting a RTB background color to anything but white and then showing the format bar which would add a white highlight color to the selected text.

pull/1645/head
brianlagunas_cp 15 years ago
parent
commit
12aae2ff0c
  1. 2
      ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs

2
ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs

@ -174,7 +174,7 @@ namespace Microsoft.Windows.Controls
private void UpdateFontBackgroundColor()
{
object value = Target.Selection.GetPropertyValue(TextElement.BackgroundProperty);
Color currentColor = (Color)((value == null || value == DependencyProperty.UnsetValue) ? Colors.White : ((SolidColorBrush)value).Color);
Color currentColor = (Color)((value == null || value == DependencyProperty.UnsetValue) ? default(Color) : ((SolidColorBrush)value).Color);
_cmbFontBackgroundColor.SelectedColor = currentColor;
}

Loading…
Cancel
Save