diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs index 633c430a..e4bef7f9 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/ColorPicker/ColorPicker.cs @@ -4,7 +4,6 @@ using System.Windows.Controls; using System.Windows.Media; using System.Windows.Controls.Primitives; using System.Collections.ObjectModel; -using System.Reflection; using System.Windows.Input; namespace Microsoft.Windows.Controls @@ -241,15 +240,15 @@ namespace Microsoft.Windows.Controls private static ObservableCollection CreateStandardColors() { ObservableCollection _standardColors = new ObservableCollection(); + _standardColors.Add(new ColorItem(Colors.Transparent, "Transparent")); _standardColors.Add(new ColorItem(Colors.White, "White")); _standardColors.Add(new ColorItem(Colors.Gray, "Gray")); _standardColors.Add(new ColorItem(Colors.Black, "Black")); _standardColors.Add(new ColorItem(Colors.Red, "Red")); - _standardColors.Add(new ColorItem(Colors.Green, "Geen")); + _standardColors.Add(new ColorItem(Colors.Green, "Green")); _standardColors.Add(new ColorItem(Colors.Blue, "Blue")); _standardColors.Add(new ColorItem(Colors.Yellow, "Yellow")); _standardColors.Add(new ColorItem(Colors.Orange, "Orange")); - _standardColors.Add(new ColorItem(Colors.Brown, "Brown")); _standardColors.Add(new ColorItem(Colors.Purple, "Purple")); return _standardColors; } @@ -260,7 +259,7 @@ namespace Microsoft.Windows.Controls foreach (var item in ColorUtilities.KnownColors) { - if (String.Compare(item.Key, "Transparent", false) != 0) + if (!String.Equals(item.Key, "Transparent")) { var colorItem = new ColorItem(item.Value, item.Key); if (!_standardColors.Contains(colorItem)) diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs new file mode 100644 index 00000000..92d7c7ea --- /dev/null +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/ColorToSolidColorBrushConverter.cs @@ -0,0 +1,26 @@ +using System; +using System.Windows.Data; +using System.Windows.Media; + +namespace Microsoft.Windows.Controls.Core.Converters +{ + public class ColorToSolidColorBrushConverter : IValueConverter + { + #region IValueConverter Members + + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + if (value != null) + return new SolidColorBrush((Color)value); + + return value; + } + + public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + throw new NotImplementedException(); + } + + #endregion + } +} diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs index 10684dcb..2bcdc0fe 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Core/Converters/InverseBoolConverter.cs @@ -19,4 +19,4 @@ namespace Microsoft.Windows.Controls.Core.Converters #endregion } -} +} \ No newline at end of file diff --git a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml index 9b8fe60d..166f4e6f 100644 --- a/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml +++ b/ExtendedWPFToolkitSolution/Src/WPFToolkit.Extended/Themes/Generic.xaml @@ -581,6 +581,8 @@ + + @@ -597,6 +599,26 @@ + + + + + + + + + + + + + + + + + + + + - + - - - + + + @@ -691,7 +720,16 @@ - + + +