CharacterCasing
is not valid property for TextBlock
, it's for TextBox
.
You can have IValueConverter and use it with your binding which will convert text to Upper.
Declare Converter:
public class ToUpperValueConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter,
CultureInfo culture)
{
if (value is string)
{
return value.ToString().ToUpper();
}
return String.Empty;
}
public object ConvertBack(object value, Type targetType, object parameter,
CultureInfo culture)
{
return Binding.DoNothing;
}
}
Now, add a reference of your converter in XAML and use like this:
<TextBlock Text="{Binding Description,
Converter={StaticResource ToUpperValueConverter}}"/>