2021-07-20 23:06:09 +02:00
|
|
|
|
using System;
|
|
|
|
|
using System.Globalization;
|
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
|
|
|
|
|
namespace TINK.View
|
|
|
|
|
{
|
2022-09-06 16:08:19 +02:00
|
|
|
|
/// <summary> Inverts a bool.</summary>
|
|
|
|
|
public class BoolInverterConverter : IValueConverter
|
|
|
|
|
{
|
|
|
|
|
/// <summary> Inverts a bool.</summary>
|
|
|
|
|
/// <param name="value">Bool to invert.</param>
|
|
|
|
|
/// <returns>Inverted bool.</returns>
|
|
|
|
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
=> value is bool flag && !flag;
|
2021-07-20 23:06:09 +02:00
|
|
|
|
|
2022-09-06 16:08:19 +02:00
|
|
|
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|
|
|
|
=> value is bool flag && !flag;
|
|
|
|
|
}
|
2021-07-20 23:06:09 +02:00
|
|
|
|
}
|