From 9e93725a47a22323e43e90b2dca333c88fe7faf2 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/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/RichTextBoxFormatBar/RichTextBoxFormatBar.xaml.cs index 98f39321..a8cb83c6 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) ? default(Color) : ((SolidColorBrush)value).Color); + Color currentColor = (Color)((value == null || value == DependencyProperty.UnsetValue) ? Colors.Transparent : ((SolidColorBrush)value).Color); _cmbFontBackgroundColor.SelectedColor = currentColor; }