CharacterCasing Enumeration
.NET Framework 3.0
Specifies the case of characters typed manually into a TextBox control.
Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
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>
using System; using System.Windows; using System.Windows.Controls; namespace SDKSample { public partial class CharacterCasingExample : Page { public CharacterCasingExample() { StackPanel myStackPanel = new StackPanel(); //Create TextBox TextBox myTextBox = 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); this.Content = myStackPanel; } } }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: