17 lines
576 B
C#
17 lines
576 B
C#
using System;
|
|
using System.Globalization;
|
|
using Avalonia.Data.Converters;
|
|
using Avalonia.Media;
|
|
|
|
namespace ClaudeDo.Ui.Converters;
|
|
|
|
public sealed class BoolToItalicConverter : IValueConverter
|
|
{
|
|
public static BoolToItalicConverter Instance { get; } = new();
|
|
|
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
=> value is true ? FontStyle.Italic : FontStyle.Normal;
|
|
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
|
|
=> throw new NotSupportedException();
|
|
}
|