Binding controls to other controls and to classes
This commit is contained in:
15
AdventureWorks.MAUI/Converters/InvertedBoolConverter.cs
Normal file
15
AdventureWorks.MAUI/Converters/InvertedBoolConverter.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Globalization;
|
||||
|
||||
namespace AdventureWorks.MAUI.Converters;
|
||||
|
||||
public class InvertedBoolConverter : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return !(bool)value;
|
||||
}
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user