Attached property of type list
I want to create an attached property that can be used with this syntax: <Button> <Image .../> <ui:ToolbarItem.DisplayFilter> <TabItem .../> <TabItem .../> <TabItem .../> </ui:ToolbarItem.DisplayFilter> </Button> This is my attempt at doing so: public class ToolbarItem { /// <summary> /// Identifies the DisplayFilter attached property. /// </summary> public static readonly DependencyProperty DisplayFilterProperty = DependencyProperty.RegisterAttached( "DisplayFilter", typeof( IList ), typeof( ToolbarItem ) ); public static IList GetDisplayFilter( Control item ) { return (IList)item.GetValue(