Binding targets must be public?
It appears so! I had a nice informative binding working in my window's frame, did some refactoring, and it disappeared. My property accessors just weren't getting called. Here's the interesting code, which was bound using the notation that follows:
// Local object accessor to make the binding easier
public RicsUser CurrentUser
{
get
{
return App.CurrentUser;
}
}
// Local object accessor to make the binding easier
protected Organization CurrentOrganization
{
get
{
return App.CurrentOrganization;
}
}
// XAML
<TextBlock
x:Name="_userTag"
Text="{Binding Path=CurrentUser, Converter={StaticResource UserNameConverter}, ElementName=_RicsMainWindow, Mode=Default}"
/>
One gets called, the other doesn't. Both are bound identically to the TextProperty on a TextBlock. If I change CurrentOrganization from protected to private to internal, still fails. Make it public, everything works.
As an aside, this was the cause of my earlier problem, and my earlier solution can be used as a workaround for this.