It's equivalent to an empty Path. The apostrophes simply enclose whatever you write between them. So in your case it's a Binding to the DataSource (without a Path) - although I have to say, I've never seen it used that way.
The reason you probably didn't find this in any Bindings related context is because it's actually a feature that is available to all XAML markup extensions (like Binding
, Static
, StaticResource
, etc.).
MSDN: Details about how markup extensions are parsed
The text value of either a MEMBERNAME or STRING is read as follows. Leading whitespace characters are consumed without being represented in the generated token. If the first non-whitespace character is a quote (either Unicode code point 0022, Quotation Mark, or 0027, Apostrophe), the tokenizer proceeds as follows:
The first quote is consumed and is not represented in the token’s value.
The text value becomes the characters up to but not including the next matching quote (i.e. a character of the same code point as the opening quote) that is not preceded by a “\” character. All these characters and also the closing quote are consumed. Any “\” characters in the resulting text value are removed.
Whitespace characters following the closing quote are consumed, and are not represented in the token.
Take this simple (and rather useless) extension for example:
public class StringExtension : MarkupExtension
{
public StringExtension()
{ }
public StringExtension(string value)
{
Value = value;
}
public string Value { get; set; }
public override object ProvideValue(IServiceProvider serviceProvider)
{
return Value;
}
}
The extension could be used like this (all identical results):
<!-- via constructor (1 argument) -->
<TextBlock Text="{local:String text}"/>
<!-- via constructor (1 argument) -->
<TextBlock Text="{local:String 'text'}"/>
<!-- via empty constructor + named property -->
<TextBlock Text="{local:String Value=text}"/>
<!-- via empty constructor + named property -->
<TextBlock Text="{local:String Value='text'}"/>
So, what are the '
s used for? Well for example for leading and trailing Whitespaces.
<!-- no whitespaces -->
<TextBlock Text="{local:String text }"/>
<!-- whitespaces -->
<TextBlock Text="{local:String ' text '}"/>