Creating a Multi Value Converters in Silverlight

In this Blog we will be discussing how to create Multi Value Converter in Silverlight .

Below is the code to create MultiValue Converters in Silverlight .


public
class TitleConverter : IMultiValueConverter
{

#region
IMultiValueConverter Members
public object Convert(object[] values, Type targetType,
object parameter, System.Globalization.CultureInfo culture)
{
string forename = values[0] as string;
string surname = values[1] as string;
return string.Format("{0}, {1}", surname, forename);
}
public object[] ConvertBack(object value, Type[] targetTypes,
object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}

#endregion

}
Ebook Download
View all
Learn
View all