Apex.Converters.StringCaseConverter

Supported In:

WPF .NET 3.5, WPF .NET 4.0, Silverlight 3, Silverlight 4, Windows Phone 7, Windows Phone 7.1

Description:

The StringCaseConverter takes a string as its input and returns the string, with the case transformed. If the converter parameter is 'Upper' the string is returned in uppercase. If the converter parameter is 'Lower' the string is returned in lowercase.

Example:

 

<!-- Create the converter. -->
<apexConverters:StringCaseConverter
    x:Key="StringCaseConverter" />
       
<!-- Shows the string in upper-case. -->
<TextBlock
    Text="{Binding Name,
    Converter={DynamicResource StringCaseConverter},
    ConverterParameter=Upper}" />
       
<!-- Shows the string in lower-case. -->
<TextBlock
    Text="{Binding Name,
    Converter={DynamicResource StringCaseConverter},
    ConverterParameter=Lower}" />

Last edited Feb 26, 2012 at 5:07 PM by dwmkerr, version 2

Comments

No comments yet.