From 12aae2ff0c64ecc27653ccaee077c013a44b6caf Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Fri, 11 Feb 2011 19:38:38 +0000 Subject: [PATCH] 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. --- .../RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs index d7c65788..98f39321 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs +++ b/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; }