LANCommander/LANCommander.Launcher/Converters/BoolToFontWeightConverter.cs
Pat Hartl b183e4b18c Remove old launcher, rename Avalonia launcher
Also adds ARM builds for Linux + Windows launcher
2026-06-06 05:49:24 -05:00

20 lines
702 B
C#

using System;
using System.Globalization;
using Avalonia.Data.Converters;
using Avalonia.Media;
namespace LANCommander.Launcher.Converters;
/// <summary>Converts a boolean to FontWeight: true → SemiBold, false → Normal.</summary>
public class BoolToFontWeightConverter : IValueConverter
{
public static readonly BoolToFontWeightConverter Instance = new();
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value is true ? FontWeight.SemiBold : FontWeight.Normal;
}
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
=> throw new NotSupportedException();
}