Reputation: 1
I bind a appointment object to a Textblock:
TextBlock textBlock = new TextBlock();
Binding binding = new Binding();
binding.Path = new PropertyPath("Subject");
textBlock.SetBinding(TextBlock.TextProperty, binding);
textBlock.DataContext = appointment;
The result is, that the Subject of the appointment is shown in the Textblock.
Now I want that the time of the appointment is shown in the textblock before the subject of the appointment. Can anybody help me modifying my source code to get that result?
Upvotes: 0
Views: 443
Reputation: 6142
Well there is always the MultiBindingBehaviour from the Cimbalino toolkit, it's explained here https://www.pedrolamas.com/2013/05/17/cimbalino-windows-phone-toolkit-multibindingbehavior/
It allows to give multiple input params for one output. The toolkit can be installed through NuGet
Upvotes: 0
Reputation: 425
I am probably missing something obvious, but couldn't you use one of the following:
There are probably a few others, but those come to mind on first thought. If neither of these will work for you, let us know.
Upvotes: 1