// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using System;
using System.Windows.Data;
namespace Microsoft.Management.UI.Internal
{
///
/// Takes a bool value and returns the inverse.
///
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.MSInternal", "CA903:InternalNamespaceShouldNotContainPublicTypes")]
public class InverseBooleanConverter : IValueConverter
{
///
/// Converts a boolean value to be it's inverse.
///
/// The source value.
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
/// The inverted boolean value.
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
if (value == null)
{
throw new ArgumentNullException("value");
}
var boolValue = (bool)value;
return !boolValue;
}
///
/// This method is not used.
///
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
/// The parameter is not used.
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
}
}