Let’s assume that I have defined two Grids and few TextBoxes in my XAML. I want to put these TextBoxes in the Grids at runtime (I know which TextBox should be put in which Grid after starting the application).
I thought it would be possible to simply add a row definition to the Grid in my C# code, however the text boxes bind to some Style.
Maybe there is a simple solution (entirely in XAML – preferred)?
So the question is – how to dynamically fill the grid during the runtime with the items (text boxes) and the grid defined in XAML? Both items bind to some styles etc.
Thanks in advance for the replies and hints!
Cheers
I don’t fully get you question, but if I understood correctly you want TextBoxes inside your grid using XAML.
If this is the case
you can do:
and then in a static resource:
HTH