Files
Shrlalgo.RvKits/WPFDark/Controls/Converters/DoubleColorToBrushConverter.cs
ShrlAlgo 4d35cadb56 更新
2025-07-11 09:20:23 +08:00

22 lines
622 B
C#

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();
}
}
}