From aea48c8169273166b99549a5c81af372ef9a6aae Mon Sep 17 00:00:00 2001 From: brianlagunas_cp Date: Thu, 30 Jun 2011 18:06:37 +0000 Subject: [PATCH] RichTextBoxFormatBar: fixed bug when the background of selected words would turn black. --- .../RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs index 98f39321..a8cb83c6 100644 --- a/Main/Source/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs +++ b/Main/Source/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) ? default(Color) : ((SolidColorBrush)value).Color); + Color currentColor = (Color)((value == null || value == DependencyProperty.UnsetValue) ? Colors.Transparent : ((SolidColorBrush)value).Color); _cmbFontBackgroundColor.SelectedColor = currentColor; }