Files
PulsarK-main/Pulsar.Server/Controls/Wpf/FavoriteToBrushConverter.cs
T
i2p 773d05f8f1
Pulsar .NET 9.0 Windows Release / build (push) Waiting to run
Mirror to Codeberg and Gitea / mirror (push) Waiting to run
initial commit
2026-08-27 10:57:58 -06:00

24 lines
653 B
C#

using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
#nullable enable
namespace Pulsar.Server.Controls.Wpf
{
internal sealed class FavoriteToBrushConverter : IValueConverter
{
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
bool isFavorite = value is bool flag && flag;
return isFavorite ? Brushes.Gold : Brushes.Gray;
}
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotSupportedException();
}
}
}