The typical way to do bindings in XAML is using property attributes, and this works just fine:
<Label Text="{Binding CategoryName}" />
One should also be able to bindings on property elements, but this doesn't work:
<Label>
<Label.Text>
<Binding Path="CategoryName" />
</Label.Text>
</Label>
That approach fails with a TargetInvocationException upon creating the page.
Note that other Markup Extensions on a property element work fine, such as x:Static:
<Label>
<Label.Text>
<x:Static Member="local:GlobalResources.CategoryString" />
</Label.Text>
</Label>
...and custom markup extensions:
<Label>
<Label.Text>
<local:LocalizedTextExtension Key="page_main_button_settings" />
</Label.Text>
</Label>
Both of those work without problem. Can someone advise on how to make this work for Binding too, assuming it can be done?