整理代码
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
using ShrlAlgoToolkit.RevitAddins.Converters;
|
||||
using ShrlAlgoToolkit;
|
||||
using ShrlAlgoToolkit.Mvvm;
|
||||
|
||||
namespace ShrlAlgoToolkit.RevitAddins.Converters;
|
||||
|
||||
public class ColorToBrushConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
//var color = (SelectedColor)value;
|
||||
if (value is System.Windows.Media.Color color)
|
||||
{
|
||||
return new SolidColorBrush(color);
|
||||
}
|
||||
return Binding.DoNothing;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{ throw new NotImplementedException(); }
|
||||
}
|
||||
Reference in New Issue
Block a user