blob: ea4e8d0ec282690aca90b9bc0ca6366e2555f149 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
using System;
using System.Globalization;
using Xamarin.Forms;
namespace PagesGallery
{
public class CapitalizationConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var str = (value as string ?? value.ToString());
return char.ToUpper(str[0]) + str.Substring(1);
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
|