0

I've tried implementing a user defined property for my user control class by including the code :

Private title As String = ""

<Category("Titles"),
Description("Title of the application")>
Public Property MyTitle() As String
    Get
        Return title
    End Get
    Set(value As String)
        title = value
    End Set
End Property

But the property Title still does not appear when looking at the [Design] layout and in the properties.

Am i missing something?

Reza Aghaei
  • 120,393
  • 18
  • 203
  • 398
emanyalpsid
  • 329
  • 1
  • 5
  • 19
  • 1
    Drop an instance of your control on a `Form` and you can see the property in property grid if you select the control. The properties you see in designer of your control are properties of its base class `Control`. But when you put an instance of it on a `Form` the properties are properties of the instance of your control. This is the way that designer works. – Reza Aghaei Oct 15 '16 at 19:06
  • Also for more information take a look at [this post](http://stackoverflow.com/a/32299687/3110834). – Reza Aghaei Oct 15 '16 at 19:21
  • @RezaAghaei Thanks! Marked as duplicate – emanyalpsid Oct 15 '16 at 21:53

0 Answers0