2 using System
.ComponentModel
;
4 using System
.Windows
.Controls
;
5 using System
.Windows
.Documents
;
6 using System
.Windows
.Navigation
;
7 using System
.Windows
.Shapes
;
8 using System
.Windows
.Data
;
9 using System
.Globalization
;
10 using System
.Collections
.ObjectModel
;
14 public class NameConverter
: IMultiValueConverter
16 public object Convert(object[] values
, Type targetType
, object parameter
, CultureInfo culture
)
20 switch ((string)parameter
)
22 case "FormatLastFirst":
23 name
= values
[1] + ", " + values
[0];
27 name
= values
[0] + " " + values
[1];
34 public object[] ConvertBack(object value, Type
[] targetTypes
, object parameter
, CultureInfo culture
)
36 string[] splitValues
= ((string)value).Split(' ');