Add Windows desktop version
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace StreamPlayer.Desktop.Converters;
|
||||
|
||||
public sealed class InverseBooleanConverter : IValueConverter
|
||||
{
|
||||
public static readonly InverseBooleanConverter Instance = new();
|
||||
|
||||
public object? Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is bool boolean)
|
||||
{
|
||||
return !boolean;
|
||||
}
|
||||
return Avalonia.AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
|
||||
public object? ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
|
||||
{
|
||||
if (value is bool boolean)
|
||||
{
|
||||
return !boolean;
|
||||
}
|
||||
return Avalonia.AvaloniaProperty.UnsetValue;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user