|
using System;
using System.Globalization;
using System.Windows.Data;
namespace TaskList
{
public class TitleConverter : IValueConverter
{
#region IValueConverter Members
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string title = value.ToString();
if (string.IsNullOrEmpty(title))
return "Task List";
return string.Format(CultureInfo.CurrentUICulture, "Task List - {0}", title);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Windows developer with 10+ years experience working in the banking industry.