更新
This commit is contained in:
22
WPFDark/Controls/Converters/DoubleColorToBrushConverter.cs
Normal file
22
WPFDark/Controls/Converters/DoubleColorToBrushConverter.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
|
||||
namespace WPFDark.Controls.Converters
|
||||
{
|
||||
public class DoubleColorToBrushConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (!(value is DoubleColor item))
|
||||
return null!;
|
||||
|
||||
return Caches.GetSolidColorBrush(item.ByteColor);
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user