Sven Groot said:
*snip*
Err, I can give you step by step if that helps..
Start a new wpf app.. create a new user control
Change the default xml namespace (xmlns) to the clr namespace of your project (ie,
xmlns="clr-namespace:WpfApplication1")
Remove the height and width properties, and delete the child grid..
Change UserControl (root element) to TestObj (ensure you change the closing tag as well)..
Now go into the code behind for that xaml and above the class add another:
public class TestObj
{
}
Change the code behind class to inherit from TestObj
Everything should be happy (the wpf app won't run - but the designer and compilation will be happy)..
Not add a property to TestObj.. sayyy:
public bool IsXamlCool { get; set; }
Go to the xaml and add IsXamlCool property add you'll get intellisense autocomplete, the designer will be happy and compiles etc..
Then change the property to be
<Testobj.IxXamlCool>True</Testobj.IxXamlCool>
As a child element.. you should get an error:
"Unknown build error, 'Object reference not set to an instance of an object.'"
I'm trying to work out if this is a bug with xaml, or I need to specify some type conversions to do even primative conversions like bools.