This repository has been archived on 2024-01-02. You can view files and clone it, but cannot push or open issues or pull requests.
Sic06/FrameworkLocal/UIClient/Ctrlib/Converter/UnitOnlineBorderColorConver...

29 lines
819 B
C#
Raw Normal View History

2023-01-13 10:57:37 +08:00
using System;
using System.Windows.Data;
using OpenSEMI.Ctrlib.Controls;
namespace MECF.Framework.UI.Client.Ctrlib.Converter
{
public class UnitOnlineBorderColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value is bool)
{
if ((bool) value)
return "LimeGreen";// "#AFC2D3";
else
{
return "Gray";
}
}
return "Transparent";
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}