UserControl Custom Properties

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kjward
    New Member
    • Apr 2010
    • 2

    UserControl Custom Properties

    i am creating a usercontrol having a number of somewhat inter-related custom properties such that when a certain value is selected for one, one of the other properties should not then be settable.

    how to do that?

    thanks
  • ThatThatGuy
    Recognized Expert Contributor
    • Jul 2009
    • 453

    #2
    you can't do that... Never heard so...

    although you can check the value of one property and then accordingly..u can set the value of the another property...

    that will help

    Comment

    • kjward
      New Member
      • Apr 2010
      • 2

      #3
      Originally posted by ThatThatGuy
      you can't do that... Never heard so...

      although you can check the value of one property and then accordingly..u can set the value of the another property...

      that will help
      thanks. that's a good start, but what's to stop the user from then manually overriding the value so that it no longer complies with the business rule? this could get into an unstable back-and-forth. i think i have seen some MS/VS controls disable certain features of themselves, depending on other property settings. is the "Browsable" property attribute settable programmaitcall y?

      Comment

      • ThatThatGuy
        Recognized Expert Contributor
        • Jul 2009
        • 453

        #4
        Browsable Attribute determines whether your property will be shown in the properties window

        Comment

        Working...