Cannot Add control to form

后端 未结 1 430
予麋鹿
予麋鹿 2021-01-21 04:01

I\'m trying to add a Usercontrol to a form. The UserControl is in a separate project than the form, but is in the same solution. I have added this control to other forms in the

相关标签:
1条回答
  • 2021-01-21 04:51

    read about DesignerSerializationVisibility Enumeration

    put this attribute  on MessageList property

    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    

    in this situation designer will lost user change in MessageList but if you set it to

    [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
    

    Designer will save the Property Content in Designer.cs of control host

    0 讨论(0)
提交回复
热议问题