Welcome to mirror list, hosted at ThFree Co, Russian Federation.

OppositeBoolConverter.cs « Xamarin.PropertyEditing.Windows - github.com/xamarin/Xamarin.PropertyEditing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b3064336baf47caffce5c3e85c72ae2440b419a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Globalization;
using System.Windows.Data;

namespace Xamarin.PropertyEditing.Windows
{
	internal class OppositeBoolConverter
		: IValueConverter
	{
		public object Convert (object value, Type targetType, object parameter, CultureInfo culture)
		{
			if (value == null || !(value is bool))
				return null;

			return !(bool)value;
		}

		public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
		{
			throw new NotImplementedException ();
		}
	}
}