Wes Aday, essentially, already answered the question in his comment to it.
It's hard to believe that you were unable to find all what you need:
https://msdn.microsoft.com/en-us/library/ms158234(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/hhef7hhe(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/system.char.toupper(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/ewdd6aed(v=vs.110).aspx[
^],
https://msdn.microsoft.com/en-us/library/e78f86at(v=vs.110).aspx[
^] (see also other
ToUpper
and
ToLower
functions, those taking cultures into account).
Basically, that's all. But if you want to create a
real virtual keyboard, please see my detailed recent answer:
How to fire a Key Press event of a Key on button click in WPF[
^].
Now, about the traversing the set of buttons. Here is my main advice: don't use the designer; it will be too much stupid manual work. Instead, add all keys (buttons) programmatically, in code, calculating their positions from some data model describing the keyboard layout. For example, you can produce the list of buttons each representing a key row, and a list of those lists representing the whole keyboard. And then you can traverse both lists in code, in two nesting
foreach
loops. Or you can create one single list or array (maybe using the list's
ToArray
method) representing all the keys (buttons). And, in the loop, do the changes you want.
If you need realistic keyboard layouts built in the same way as traditional keyboards, you will need the combination if shift and CAPS states of the keyboard. You can keep all the information on all states in each of the buttons, using, say, the button's
Tag
property.
—SA