1 // -------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All Rights Reserved.
3 // -------------------------------------------------------------------
4 //From \\authoring\Sparkle\Source\1.0.1083.0\Common\Source\Framework\Data
5 namespace System.Activities.Presentation.Internal.PropertyEditing.FromExpression.Framework.Data
8 using System.Collections;
9 using System.ComponentModel;
10 using System.Diagnostics;
11 using System.Globalization;
12 using System.Reflection;
14 using System.Windows.Controls;
15 using System.Windows.Data;
16 using System.Diagnostics.CodeAnalysis;
20 // Converts non-null to true, and null to false.
22 [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
23 internal class NullToBoolConverter : IValueConverter
25 // IValueConverter Implementation
27 public object ConvertBack(object o, Type targetType, object parameter, CultureInfo culture)
29 Fx.Assert(false, "NullToBoolConverter can only be used for forward conversion.");
33 public object Convert(object o, Type targetType, object parameter, CultureInfo culture)