Files
aistudio-wpf-diagram/Extensions/AIStudio.Wpf.Mind/Converters/MindThemeFontBrushConverter.cs
2023-04-16 20:11:40 +08:00

30 lines
856 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
using AIStudio.Wpf.Mind.Helpers;
using AIStudio.Wpf.Mind.Models;
namespace AIStudio.Wpf.Mind.Converters
{
public class MindThemeFontBrushConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is MindTheme mindTheme)
{
var mindThemeModel = MindThemeHelper.GetTheme(mindTheme);
return new SolidColorBrush(mindThemeModel.MindThemeLevel0.FontColor);
}
return new SolidColorBrush();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}