Visual Studio 2010 design time collection editor

I am working on a custom control for WPF and Silverlight. This control has a collection property of a complex type that is abstract, like such:

public Collection<MyBase> Configuration
    {
        get { return (Collection<MyBase>)GetValue(ConfigurationProperty); }
        set { SetValue(ConfigurationProperty, value); }
    }

    // Using a DependencyProperty as the backing store for Configuration This enables animation, styling, binding, etc...
    public static readonly DependencyProperty ConfigurationProperty =
        DependencyProperty.Register("Configuration", typeof(Collection<MyBase>), typeof(MyControl), new PropertyMetadata(new ObservableCollection<MyBase>()));

My problem is that I can't add new items to this property in Visual Studio 2010's designer because it doesnt know any derived types of MyBase.

Is there any way to register these types with the designer? The editor works fine with existing items, and can remove and modify them. An image to illustrate:

enter image description here

5
задан Bas 8 April 2011 в 16:04
поделиться