I'm trying to figure out how to use a variable in code for databinding in a designer object. Example of what I'm trying to achieve: Say I have a string
firstString and I set values to it in code. Now how do I make a TextBox
to show this value through Databinding? I know I could just do TextBox.Text
, but im looking for a Databinding way.
How about Generic lists
? How would I populate a ListBox
element in the designer with the objects from a list in the code by Databinding?
I went through this tutorial on how to link other designer objects to each other and some posts how to use whole classes as a DataContext
. But I did not find an answer to this question in them.
Any help is appreciated.