Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
EnumToBoolean.cs
1using System;
2using System.Globalization;
3using Microsoft.Maui.Controls;
4
5
7{
8 public class EnumToBoolean : IValueConverter
9 {
10 public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
11 {
12 return value?.Equals(parameter) ?? false;
13 }
14
15 public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
16 {
17 return (bool)(value ?? false) ? parameter : null;
18 }
19 }
20}