Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make all text upper case / capital?

I want all texts in TextBlock, Label, MenuItem.Header to be displayed in upper case. The strings are taken from a ResourceDictionary e.g.:

<TextBlock Text="{StaticResource String1}"/> <MenuItem Header="{StaticResource MenuItemDoThisAndThat}"/> 

etc. (also for Label and other controls)

I cannot use a value converter because there is no binding. I don't want to make the strings upper case in the dictionary itself.

like image 934
GG. Avatar asked Nov 19 '09 10:11

GG.


People also ask

How do I change text from all to UPPERCASE?

To use a keyboard shortcut to change between lowercase, UPPERCASE, and Capitalize Each Word, select the text and press SHIFT + F3 until the case you want is applied.

How do you make all text in a cell UPPERCASE?

Type =PROPER(A2), and press Enter. Tip: Use the formula =UPPER(A1) for all UPPERCASE; =LOWER(A1) for all lowercase.

How can I make an entire text capitalize without retyping?

You just need to use Microsoft Word's Change Case feature. Select the text you want to change the case of, using your mouse or keyboard. On the Home tab of the Ribbon, go to the Fonts command group and click the arrow next to the Change Case button.

How do you capitalize all letters on a keyboard?

Pressing the 'shift' key allows you to type capital letters and the symbols at the top of the keys. The 'shift' keys are on the left and right of the keyboard, with the arrow pointing upwards. For capital letters, hold down the 'shift' key and hold and type the letter.


1 Answers

I think this will work for you

<TextBlock Text='{StaticResource String1}' Typography.Capitals="AllPetiteCaps"/> 

For font capitals enumerations https://msdn.microsoft.com/en-us/library/system.windows.fontcapitals(v=vs.110).aspx

like image 97
Alias Varghese Avatar answered Sep 29 '22 08:09

Alias Varghese