1. defaultvalue: it does not provide the default value during design. It is the same as the value you entered and the value you set. The value remains unchanged and is displayed in bold ].
[Description ("value of label1 ")
, Defaultvalue ("label123 ")
]
Public String code
{
Get {return label1.text ;}
Set {label1.text = value ;}
}
If label1.text is not equal to "label123", the value of the Code attribute displayed in IDE is in bold (indicating that the attribute value is changed if it is different from the default value)
2. vs.net 2005 incorrect path format
This problem seems to be a bug in MS, which often occurs when custom controls or UIS change.
The solution is generally:
First: recompileProgram(F6)
Second, the solution is extremely simple.
Switch to frmmanagebase. CS and find
Public frmmanagebase ()
{
Initializecomponent ();
}
Click Enter here or outside, or anywhere in the CS file!
This is found on the Internet, that is, you can change something in the wrong form and save it.
If it still does not work, you can try to turn off the project and re-open it (remember to save it)
3. Set the default event of the control:
[Defaultproperty ("code2"), defaultevent ("usercontrolclicked")]
Public partial class usercontrol1: usercontrol
{