I have a AutoCompleteBox bound to the datasource. DataSource contains two string
properties. I have defined ItemTemplate for AutoCompleteBox.
I want second property to come closed in brackets e.g. Property1 Data (Property2 Data)
I will have to define StringFormat during Binding.
I am totally unaware of format. Can anyone tell me the format.
Thanks.
here is examples.
A simple way to use StringFormat in the binding.
Output: (0)
Using
<Run>tags you can also build complex values.Output: Distance: 200km
If you use the second example, you must just add another
<Run>tag for the next value.You can also use a horizontal
StackPanelto show multiple values.Output: Start Distance: 200km