The Great Escape
... and other cautionary tales
As with xaml
, string literals can be enclosed within 'single quotes' or "double quotes" with appropriate use of xml
escape-sequences.
Commas
If your expression string has commas in it, you must hide them from the xaml parser, otherwise z:Bind
etc. will be given an incomplete string and things won't work as expected.
You can do this by enclosing the string inside quotes, like this:
or this
and so on
Strings
If your expression string has string literals in it, you must 'escape' them, otherwise z:Bind
etc. will be given an incorrect string and things won't work as expected. For example:
or this
and so on
Long form
If your expression is getting bogged down in escape-sequences and commas and quotes, or if that's just the way you roll, you can use the long-form of expressing a z:Bind
expression:
becomes
Last updated