Export (0) Print
Expand All
Expand Minimize

CharacterCasing Enumeration

Specifies the case of characters typed manually into a TextBox control.

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

'Declaration
Public Enumeration CharacterCasing
<object property="enumerationMemberName" .../>

Member nameDescription
NormalCharacters typed into a TextBox are not converted.
LowerCharacters typed into a TextBox are converted to lowercase.
UpperCharacters typed into a TextBox are converted to uppercase.

The value of this enumeration does not affect characters that are added to a TextBox programmatically.

The following example shows how to use the CharacterCasing property to convert all characters to uppercase that are manually entered into a TextBox.


<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>




Imports System
Imports System.Windows
Imports System.Windows.Controls

Namespace SDKSample
	Partial Public Class CharacterCasingExample
		Inherits Page
		Public Sub New()
			Dim myStackPanel As New StackPanel()

			'Create TextBox
			Dim myTextBox As New TextBox()
			myTextBox.Width = 100

			' The CharacterCasing property of this TextBox is set to 
			' "Upper" which causes all manually typed characters to 
			' be converted to upper case.
			myTextBox.CharacterCasing = CharacterCasing.Upper
			myStackPanel.Children.Add(myTextBox)
			Me.Content = myStackPanel
		End Sub
	End Class
End Namespace


.NET Framework

Supported in: 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Community Additions

ADD
Show:
© 2015 Microsoft