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
Label
MenuItem.Header
ResourceDictionary
<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.
You still can use a converter, just set the textvalue in the source of the binding :
<TextBlock Text="{Binding Source={StaticResource String1}, Converter ={StaticResource myConverter}}"/>
2.1m questions
2.1m answers
60 comments
57.0k users