using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Data; using System.Globalization; using System.Windows; namespace WpfApplication19 { public class NameConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { string name; Console.WriteLine(values[0].ToString()); if (values[0] == DependencyProperty.UnsetValue) { return ""; } name = values[0] + "-" + values[1]; return name; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { string[] splitValues = ((string)value).Split(' '); return splitValues; } } }