Is there a way to automatically capitalize all input thoughtout a WPF app?
相关问题
- VNC control for WPF application
- WPF Binding from System.Windows.SystemParameters.P
- XAML: Applying styles to nested controls
- Jasper: error opening input stream from url
- How can I add a horizontal line (“goal line”) for
I don't know if this'll help, it capitalizes all the first letters in the sentence.
http://www.mardymonkey.co.uk/blog/auto-capitalise-a-text-control-in-wpf/
You can case all input into
TextBox
controls with the following property:To apply to all
TextBox
controls in the entire application create a style for allTextBox
controls:I recommend creating a custom Textbox class and override an event to automatically capitalize the text. First, this depends on if you want the text to be capitalize as they type or after input is finished.
E.g. for after input is finished
If you want to capitalize the input for a single
TextBox
rather than allTextBox
es like above, you can use the following: