using System; using System.Windows.Data; namespace Muchinfo.MTPClient.Account.Utilities { public class UpFlagConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value is double) { var data = (double)value; if (data > 0) { return "+"; } else if (data < 0) { return "-"; } } return ""; } public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return 0; } } }