Visual Studio 2010 Development Time 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, for example:

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 cannot add new elements to this property in the designer of Visual Studio 2010, because it does not know any derived MyBase types.

Is there a way to register these types with a designer? The editor works great with existing elements and can delete and modify them. Image for illustration:

enter image description here

+5
source share
1 answer

NewItemTypesAttribute. , WPF/Silverlight . .

+5

All Articles