ag_e_parser_bad_property_value Silverlight Binding Page Title

Posted by zXynK on Stack Overflow See other posts from Stack Overflow or by zXynK
Published on 2010-04-18T16:19:19Z Indexed on 2010/04/18 16:23 UTC
Read the original article Hit count: 316

Filed under:

XAML:

<navigation:Page ... Title="{Binding Name}">

C#

public TablePage()
{
    this.DataContext = new Table() 
    { 
        Name = "Finding Table"
    };
    InitializeComponent();
}

Getting a ag_e_parser_bad_property_value error in InitializeComponent at the point where the title binding is happening. I've tried adding static text which works fine. If I use binding anywhere else eg:

<TextBlock Text="{Binding Name}"/>

This doesn't work either.

I'm guessing it's complaining because the DataContext object isn't set but if I put in a break point before the InitializeComponent I can confirm it is populated and the Name property is set.

Any ideas?

© Stack Overflow or respective owner

Related posts about silverlight-3.0