I'd like to use this syntax in my XAML:
<b:PersonGroup.Persons>
</b:PersonGroup.Persons>
</Button>
So I created this attached property:
public static readonly BindableProperty PersonsProperty = BindableProperty.CreateAttached("Persons", typeof(List), typeof(PersonGroup), new List);
public static List<Person> GetPersons(BindableObject bindable)
{
return (List<Person>)bindable.GetValue(PersonsProperty);
}
public static void SetPersons(BindableObject bindable, List<Person> value)
{
bindable.SetValue(PersonsProperty, value);
}
But when XAML is parsed at runtime it says it can't find Persons property, if i use an object instead of a collection (e.g Person instead of List) it works.
Any suggestion?
Cheers