TextBox::CharacterCasing Property

 

Gets or sets how characters are cased when they are manually entered into the text box.

Namespace:   System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public:
property CharacterCasing CharacterCasing {
	CharacterCasing get();
	void set(CharacterCasing value);
}

Property Value

Type: System.Windows.Controls::CharacterCasing

One of the CharacterCasing values that specifies how manually entered characters are cased. The default is CharacterCasing::Normal.

This property does not affect characters that are added programmatically.

Identifier field

CharacterCasingProperty

Metadata properties set to true

None

The following example shows how to use the CharacterCasing property to convert all manually entered characters to uppercase in a text box.

<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
  <StackPanel>

    <!-- The CharacterCasing property of this TextBox is set to "Upper" which 
         causes all manually typed characters to be converted to uppercase. -->
    <TextBox CharacterCasing="Upper" Width="100" />
  </StackPanel>
</Page>
No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: