In data-binding you can use multi-binding.. and with multi-binding you can combine properties such {}{0} {1}. My question is what mean the first {} ? I am not talking about {0} which is used to select which property to use..
Thanks.
Binding path syntax. Use the Path property to specify the source value you want to bind to: In the simplest case, the Path property value is the name of the property of the source object to use for the binding, such as Path=PropertyName . Subproperties of a property can be specified by a similar syntax as in C#.
Data binding is a mechanism in XAML applications that provides a simple and easy way for Windows Runtime Apps using partial classes to display and interact with data.
Data binding in Windows Presentation Foundation (WPF) provides a simple and consistent way for apps to present and interact with data. Elements can be bound to data from different kinds of data sources in the form of . NET objects and XML.
A binding source is usually a property on an object so you need to provide both the data source object and the data source property in your binding XAML. In the above example the ElementName attribute signifies that you want data from another element on the page and the Path signifies the appropriate property.
It's the markup extension {} escape sequence:
The escape sequence ({}) is used so that an open brace ({) can be used as a literal character in XAML.
To elaborate: In XAML markup, {
and }
are special characters: For example, writing {Binding}
creates a Binding object. You, however, want to set the property StringFormat
to the literal value {0} {1}
. Thus, you prefix your property value with {}
to tell the parser: "The following braces are just braces and do not carry any special meaning."
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With