File: cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Converters\VBIdentifierTrimConverter.cs
Project: ndp\System.Data.csproj (System.Data)
//----------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
//----------------------------------------------------------------
 
namespace System.Activities.Presentation.Converters
{
    using System.Windows.Data;
 
    class VBIdentifierTrimConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value;
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (targetType == typeof(string) && value is string)
            {
                return ((string)value).Trim();
            }
            else
            {
                return value;
            }
        }
    }
}