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

  • SEARCH
  • Home
  • 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 281671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:13:24+00:00 2026-05-12T05:13:24+00:00

Actually i wrote a UserControl which acts as a container for other (let’s call

  • 0

Actually i wrote a UserControl which acts as a container for other (let’s call it) NestedUserControls.

I implemented a programmatically way to add such NestedUserControls to my UserControl (through an App(string name) function). But what i actually more like would be some kind of List as a public property for my UserControl.

But the problem is, that my NestedUserControl needs to be put into the private UserControl.panel.Controls list. Within my own written Add() function, this is no big problem. But how can i accomplish this problem when i use the List<NestedUserControl> property? I don’t get any informations about, when the list changes in any way.

The only idea i actually found would be to create some kind of EventList<> which throws an event whenever the list gets changed. So would this be the ‘right’ way or do you have any better approaches (or maybe there exists already some kind of EventList within .Net framework??

Oh, before i forget: I’m using VS2008, C#, WinForms, .Net 3.5 SP1

  • 1 1 Answer
  • 1 View
  • 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-12T05:13:24+00:00Added an answer on May 12, 2026 at 5:13 am

    So to get more clearity within this problem, here my solution:

    What i’d liked to do was, adding a List to my UserControlContainer, which can be easily changed at run-time or design-time. To get it correctly to work on design-time, i had to inherit from CollectionBase instead of List<> and added the DesignerSerializationVisibility(DesignerSerializationVisibility.Content) attribut. The CollectionBase itself provides some events for Insert, Remove and Clear.

    After implementing these functions and adding firing of a my own defined event ListChangedEvent to the outer world, i was able to get informations about any list change.

    The only problem you’ll have, is that the CollectionEditor won’t delete any objects from your list. Instead it seems to work with a second internal list. After hitting ok, your list will be cleared and filled up with the other events. So don’t miss to handle the CollectionBase.OnClear or CollectionBaseOnClearComplete functions!

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

Sidebar

Ask A Question

Stats

  • Questions 545k
  • Answers 545k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • added an answer Well, start off by thinking of which bits of data… May 17, 2026 at 9:17 am
  • added an answer For this task it is a good idea to use… May 17, 2026 at 9:15 am
  • added an answer This is exactly how the Skyhook database (built into many… May 17, 2026 at 9:15 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Actually, I'm using this way. Do you have a better way? private bool AcceptJson(HttpRequest
I'm trying to write a wrapper around Image_Graph bar charts. I actually wrote the
I wrote an application in C# for win 7 which used .NET 4.0 and
How many people actually write an SDD document before writing a single line of
Actually, this question seems to have two parts: How to implement pattern matching? How
Actually here is a similar topic with little practical value. As far as I
Actually my question is all in the title. Anyway: I have a class and
Actually what i am trying to build is like a kind of firewall. It
Actually I am trying to move some box alternatively with in another box. I
I actually have an answer to my question but it is not parallelized so

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.