Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4266884
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T06:49:20+00:00 2026-05-21T06:49:20+00:00

I am working on a custom control for WPF and Silverlight. This control has

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T06:49:20+00:00Added an answer on May 21, 2026 at 6:49 am

    You would need to decorate your collection property with the NewItemTypesAttribute. You can do this directly in your class, but in WPF/Silverlight these are generally defined in a separate design assembly. There is a good walk through of this here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on my first WPF application and I'm testing out a custom control
In a WPF app I have a custom control. I would like the ToolTip
I'm working on Expression Blend and I'm currently designing a custom control which has
I often find linq being problematic when working with custom collection object. They are
I can't seem to get a custom action working. I might be doing this
I was working on creating a reusable custom control (not a user control) in
I'm trying to create a custom control in WPF to display the game tree
I'm working on creating a date/time user control in WPF using C# 2008. My
I am creating a WPF custom control, a Button with an Image and Text
I'm working on moving as much logic out of a custom control as possible

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.