[ TypeConverter( typeof( ExpandableObjectConverter ) )  ]
[Description("箭头的样式"),Category("Behavior")]
public AdjustableArrowCap ArrowCapStart
{
set
{
_ArrowCapStart=(AdjustableArrowCap)value;
DrawLine(this.CreateGraphics());
this.Invalidate();
}
get
{
return _ArrowCapStart;
}
}
这是我自定义控件里的一个属性
当我将改控件放form上后更改改属性后,再编译发现属性又会到原先的值了。
我发现在更改属性是ide会在InitializeComponent()中加上更改属性的代码,例如:
his.label1.BackColor = System.Drawing.Color.DimGray;
this.label1.Location = new System.Drawing.Point(26, 35);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(114, 58);
this.label1.TabIndex = 13;
this.label1.Text = "label1";
但我发现我更改我自定义的那个属性后,系统不会在InitializeComponent()添加代码,所以导致编译后属性恢复原来的值,请问如何解决啊??????????