mirror of
https://github.com/gwdevhub/Daybreak.git
synced 2026-07-15 15:19:57 +00:00
721ee8e494
* Move shared code to Shared project * Move from Realm to Squealify * Rename Daybreak.Shared namespaces * Setup API project to expose a test API
24 lines
635 B
C#
24 lines
635 B
C#
using System;
|
|
using System.Windows.Data;
|
|
|
|
namespace Daybreak.Shared.Converters;
|
|
|
|
public class InverseBooleanConverter : IValueConverter
|
|
{
|
|
public object Convert(object value, Type targetType, object parameter,
|
|
System.Globalization.CultureInfo culture)
|
|
{
|
|
if (targetType != typeof(bool))
|
|
{
|
|
throw new InvalidOperationException("The target must be a boolean");
|
|
}
|
|
|
|
return !(bool)value;
|
|
}
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter,
|
|
System.Globalization.CultureInfo culture)
|
|
{
|
|
throw new NotSupportedException();
|
|
}
|
|
} |