1 //------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 //------------------------------------------------------------
5 namespace System.Activities.Presentation
7 using System.Diagnostics;
8 using System.Globalization;
10 using System.Windows.Data;
11 using System.Activities.Presentation.Model;
13 //Formats text strings
14 internal sealed class TextFormattingConverter : IValueConverter
16 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
18 if (parameter is string)
20 return string.Format(culture, parameter as string, value);
24 return value.ToString();
28 public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
30 throw FxTrace.Exception.AsError(new NotSupportedException());