Click here to Skip to main content
15,882,055 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have create a custom form and a UserControl which acts like custom form's title bar. What I want to achieve, is to integrate UserControl's properties into custom form's properties. Something like nested properties.

What I have tried:

Something like this. Here we have Button's properties integrated into TextBox's properties. Any idea how can I do that?
Posted
Updated 11-May-18 10:09am

1 solution

This is one way how such a Property could be made - integrate it into the Code of your Control (Form) and replace the Button with your UserControl ...
VB
<System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)>
Property ButtonProperties As Button
    Get
        Return myButton
    End Get
    Set(value As Button)
        myButton = value
    End Set
End Property
Private myButton As New Button
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900