Initial commit to new repository
This commit is contained in:
31
.decompiledproj/AxCopilot/Themes/HexToColorConverter.cs
Normal file
31
.decompiledproj/AxCopilot/Themes/HexToColorConverter.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace AxCopilot.Themes;
|
||||
|
||||
public class HexToColorConverter : IValueConverter
|
||||
{
|
||||
public static readonly HexToColorConverter Instance = new HexToColorConverter();
|
||||
|
||||
public object Convert(object value, Type t, object p, CultureInfo c)
|
||||
{
|
||||
if (value is string value2)
|
||||
{
|
||||
try
|
||||
{
|
||||
return (Color)ColorConverter.ConvertFromString(value2);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
return Colors.Transparent;
|
||||
}
|
||||
|
||||
public object ConvertBack(object v, Type t, object p, CultureInfo c)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user