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 3952806
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:53:56+00:00 2026-05-20T01:53:56+00:00

As you can see in the pic below, for a ListView Control you can

  • 0

As you can see in the pic below, for a ListView Control you can add Items using the Properties pane.

How do I enable this kind of stuff for my UserControl?

I’m not getting anything when I search Google, but I’m probably not using the correct terms.

Does anybody know?

Thanks

Visual Studio Properties Pane

  • 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-20T01:53:57+00:00Added an answer on May 20, 2026 at 1:53 am

    You need to create a class that defines the object type that the collection ids composed of. A listView has ListViewItem objects. A TabControl has TabPage objects. Your control has objects which are defined by you. Let’s call it MyItemType.

    You also need a wraper class for the collection. A simple implementation is shown below.

    public class MyItemTypeCollection : CollectionBase
    {
    
        public MyItemType this[int Index]
        {
            get
            {
                return (MyItemType)List[Index];
            }
        }
    
        public bool Contains(MyItemType itemType)
        {
            return List.Contains(itemType);
        }
    
        public int Add(MyItemType itemType)
        {
            return List.Add(itemType);
        }
    
        public void Remove(MyItemType itemType)
        {
            List.Remove(itemType);
        }
    
        public void Insert(int index, MyItemType itemType)
        {
            List.Insert(index, itemType);
        }
    
        public int IndexOf(MyItemType itemType)
        {
           return List.IndexOf(itemType);
        }
    }
    

    Finally you need to add a member variable for the collection to your user control and decorate it properly:

        [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
        public MyItemTypeCollection MyItemTypes
        {
            get { return _myItemTypeCollection; }
        }
    

    and you now have a simple interface that allows you to browse and edit the collection. Leaves a lot to be desired still but to do more you will have to learn about custom designers which can be difficult to understand and implement.

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

Sidebar

Related Questions

If you have a look at this pic - http://twitpic.com/q0a6p - you can see
May i know how can i create this kind of UI, please see the
I can see some potential difficulties with this concept but the idea is: I
I can see how you can use the Acl Extension to control the push/pull
Please see the pic. I am attaching DBs using following code. Dim conn As
The embedded pic describes my layout. As you can see, the problem is in
On this page you can see that elements of the sidebar are hidden by
From the demo below you can probably see what I am trying to do,
I can see it looks like an alias for an unsigned int pointer, right?
I can see where svn:keywords like Id, LastChangedDate and Author are used and replaced

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.