Question Dynamically Creating Textblocks and Grids

glasswizzard

Well-known member
Joined
Nov 22, 2019
Messages
126
Programming Experience
Beginner
This might seem pointless but I'd like to know if this is possible and practice doing it.

I want to type into a text box and have the text mirrored onto the form, say below the textbox. I don't want to bind a textblock to a string property even though that will do exactly as I just described. I want the word that is mirrored onto the form to consists of an individual textblock in an individual grid column for each letter, this would go into a cell on the main grid, likely centered in the form below the textbox.

So if I type the word "Hello" into the text box a five column grid would be created, in each column would be one textblock showing a single letter of the word "Hello". It's hard for me to think about attempting this because I don't know how this can be done without explicitly creating and naming the controls. I imagine using a "foreach (char c in stringName)" loop, each time a column is made, a textblock is made, added to the grid and changed to the appropriate letter but maybe I'm thinking about that wrong? How would I do this?

Thanks
 
What is the other problem? If it's unrelated to the current one, we can ask as moderator to split the topics later on.
It's easier to just start new threads yourself for each new topic that comes to mind ;)
 
Or that too. Whatever lightens your work load i guess. (y)

The reason i suggested it as i did is because the topics are likely not unrelated, and if I didn't ask I wouldn't know.
 
It's easier to just start new threads yourself for each new topic that comes to mind ;)

I do try to do that, I think I have been? Sometimes it can seem like I've left a thread hanging but that's only because I plan on coming back to it at some point. Sometimes I get an answer I can't do much with but I know that I'll be able to grasp it much better if I come back to it after learning/practicing some other things.

Sheepings, unfortunately I have no edit option next to report, I think that has a time limit and disappears eventually. I'll go through my threads and find the ones that are done and add a post saying so, then the mods can take care of it. Is that OK?
 
It's easier to just start new threads yourself for each new topic that comes to mind ;)

I could send you the titles of the threads that can be marked solved if you want since I can't do it myself. I'm trying to follow the rules but I'm not being told off by mods for leaving my threads hanging so I'm wondering if anyone actually cares or not.
 
Back
Top Bottom