Ich versuche, mehrere TabItem dynamischcally in jeder Registerkarte ein Textfeld zu erstellen. Dann möchte ich jedes Textfeld an einen Wörterbuchindex binden. Zum BeispielBind TextBox zu Dictionary
TAB1 | TAB2 | TAB3
TextBox1 | TextBox2 | TextBox3
Dictionary [TAB1] binden an TextBox1 ... etc
ich das tue:
Dictionary<string, string> dic = new Dictionary<string, string>();
Binding binding = new Binding();
binding.Source = dic[id];
binding.Path = ???
TextBox stb = new TextBox()
{
Name = "tb" + id
};
stb.SetBinding(TextBox.Text, binding);
Was soll ich in den Weg legen?
Vielen Dank für die Erklärung. Ich werde das versuchen und Feedback geben –