mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2024-12-23 07:36:31 +01:00
20 lines
647 B
C#
20 lines
647 B
C#
|
using System;
|
|||
|
using System.Globalization;
|
|||
|
using Xamarin.Forms;
|
|||
|
|
|||
|
namespace TINK.View
|
|||
|
{
|
|||
|
/// <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;
|
|||
|
|
|||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
|||
|
=> value is bool flag && !flag;
|
|||
|
}
|
|||
|
}
|