In the TFS DefaultTemplate.11.1.xaml build process template, there are many attributes whose entire values are surrounded by square braces []
, so a tag has the form
<tagName attributeName="[attributeValue]">
where tagName
, attributeName
, and attributeValue
are text strings.
I cannot find any documentation for this value syntax. From the template, it appears to cause the XAML processor to evaluate the text as an expression. Is this explained somewhere?
I believe that square braces in XAML do indeed denote a value expression. I am still uncertain exactly how this denotation is supported or enforced. Possibilities include:
-XAML syntax; I think this is the most likely answer.
-A Converter implementation somewhere which detects during parsing when a value begins and ends with square braces, and evaluates the content within during processing; I think this is the second-most likely answer.
-It's possible that the square braces are actually not special characters and are valid as part of an identifier, the evaluation of the value is performed via some other as yet unknown mechanism, and the square braces are present by convention only, perhaps to indicate that the value is not a literal but an expression to be evaluated. I think this is an unlikely answer.
Supporting research:
The last quote above is the only official documentation I have found that in any way mentions the square brace surrounding expressions as XAML attribute values, and this still does not clarify whether the designer does this merely arbitrarily and without invoking any special syntax, or if expressions must appear enclosed in square brackets according to the official XAML specification and as such the designer must do this.