patrick
patrick

Reputation: 16959

Automatically convert WPF TextBox input to All Caps?

How should I convert all WPF TextBox input text into Caps?

Upvotes: 12

Views: 5535

Answers (3)

David Fawzy
David Fawzy

Reputation: 1076

Add something like that in your global styles in App.xaml

<Style TargetType="{x:Type TextBox}">        
    <Setter Property="VerticalAlignment" Value="Center"></Setter>
    <Setter Property="Height" Value="28"/>
    <Setter Property="Padding" Value="5"/>
    <Setter Property="CharacterCasing" Value="Upper" />
</Style>

Upvotes: 1

avanek
avanek

Reputation: 1659

My guess would be to set the CharacterCasing property on the Textbox.

Upvotes: 19

novacara
novacara

Reputation: 2257

I believe TextBox has a CharacterCasing property you can set to Upper

Upvotes: 5

Related Questions