tags:

views:

21

answers:

2

Hi,

Say i have an object like

class Item
{
  string Value {get;set;}
}
class MyClass
{
    List<Item> Values {get;set;}
}

How can i make it so that when i'm using this object in XAML, i can set the value property like so.

<MyClass>
<Item>A</Item>
<Item>B</Item>
</MyClass>
A: 

Try this:

<MyClass>
    <MyClass.Values>
        <Item>A</Item>
        <Item>B</Item>
        <Item>C</Item>
    </MyClass.Values>
</MyClass>
slugster
A: 

Found the answer, i needed to put a [ContentPropertyAttribute] on!

mrwayne