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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T08:40:06+00:00 2026-06-12T08:40:06+00:00

I am developing a custom user control. The user control has a property that

  • 0

I am developing a custom user control. The user control has a property that maps to an enumeration and should not have any default value, i.e. the consumer of the control MUST set it.

The property:

<Description("This is the property description"),
Category("SomeCategory"), Bindable(True)>
Public Property SomeProperty As Enumerations.SomeEnumeration?

The enumeration:

Namespace Enumerations
    Public Enum SomeEnumeration
        Zero = 0
        One
        Two
    End Enum
End Namespace

The check:

If SomeProperty Is Nothing Then
    Throw New ApplicationException("You must set SomeProperty.")
End If

The problem:

All of the logic works. My problem is that none of the enumeration values show up in intellisense when you try to set SomeProperty from markup. A colleague of mine found this related support request, so it appears to be a known issue.

My question is, what is the best way to support all of the behaviors I need on this control, as well as keep intellisense on this property?

  • 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-06-12T08:40:07+00:00Added an answer on June 12, 2026 at 8:40 am

    I could recreate this issue – making an enumeration nullable makes the intellisense stop working. I guess this is because nullable types are objects.

    Suggest keeping the enumeration as NOT nullable. Have a default value of NotSet or None. If the enumeration is not set, you could throw an exception in your getter or initialization code.

    Property

    <Description("This is the property description"),
    Category("SomeCategory"), Bindable(True)>
    Public Property SomeProperty As Enumerations.SomeEnumeration
    

    Enumeration

    Namespace Enumerations
        Public Enum SomeEnumeration
            NotSet = -1
            Zero = 0
            One
            Two
        End Enum
    End Namespace
    

    Check

    If SomeProperty Is SomeProperty.NotSet Then
        Throw New ApplicationException("You must set SomeProperty.")
    End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say you're developing a custom control and there's a key template part that your
I am developing an asp.net mvc application and have created my custom user database
I'm currently developing a custom control and realize that my code is being run
I'm developing and C# app for Windows Mobile . I have a custom control
General purpose I am developing a .NET user control that can be used for
Please recommend books for developing ASP.NET User and Custom Controls
I'm developing a custom widget (inheriting from QWidget) to use as a control. How
I'm developing a custom search control and setting its configuration based on this sample
I am developing a custom list-search tool. I have multiple custom properties to retain
I'm developing a custom contacts app. I read default Contacts app source from Github

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.