vc_FlipBool.cs/// <copyright> /// Distrubited under The Code Project Open License (CPOL) /// The main points subject to the terms of the License are: /// /// Source Code and Executable Files can be used in commercial applications; /// Source Code and Executable Files can be redistributed; and /// Source Code can be modified to create derivative works. /// No claim of suitability, guarantee, or any warranty whatsoever is provided. /// The software is provided "as-is". /// Provides copyright protection: True /// Can be used in commercial applications: True /// Bug fixes / extensions must be released to the public domain: False /// Provides an explicit patent license: True /// Can be used in closed source applications: True /// Is a viral licence: False /// /// Copyright (c) 2007-2008 Kavan Jalal Shaban. /// </copyright>using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; using System.Globalization; using System.Windows;namespace ThreadedWpfExplorer { [ValueConversion(typeof(bool), typeof(bool))] public class vc_FlipBool : IValueConverter { public static vc_FlipBool Instance = new vc_FlipBool(); 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 !((bool)value); } } }
/// Distrubited under The Code Project Open License (CPOL)
/// The main points subject to the terms of the License are:
///
/// Source Code and Executable Files can be used in commercial applications;
/// Source Code and Executable Files can be redistributed; and
/// Source Code can be modified to create derivative works.
/// No claim of suitability, guarantee, or any warranty whatsoever is provided.
/// The software is provided "as-is".
/// Provides copyright protection: True
/// Can be used in commercial applications: True
/// Bug fixes / extensions must be released to the public domain: False
/// Provides an explicit patent license: True
/// Can be used in closed source applications: True
/// Is a viral licence: False
///
/// Copyright (c) 2007-2008 Kavan Jalal Shaban.
/// </copyright>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;
using System.Windows;namespace ThreadedWpfExplorer
{
[ValueConversion(typeof(bool), typeof(bool))]
public class vc_FlipBool : IValueConverter
{
public static vc_FlipBool Instance = new vc_FlipBool(); 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 !((bool)value);
}
}
}