I need to bind multiple properties into TextBlock with given string format. Because this part of application is created dynamically I need to do it from code-behind.
Button button = new Button();
int row = 0;
foreach (KeyValuePair<string,string> item in component.Parameters.Value){
TextBox textBox = new TextBox();
textBox.Tag = control;
string bindingKey = $"Data[{item.Value}]";
textBox.SetBinding(TextBox.TextProperty, new Binding() { Path = new PropertyPath(bindingKey), Mode = BindingMode.TwoWay, UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged };);(textBox, bindingKey);
row++;
}
I have three TextBoxes and inside button I need to combine all of them in given format: "{0}, {1} {2}". I am using WinRT for Windows 8.1 tablets. Thank you!