我有我的Control.When我改变控件的属性。我得到这个:设计师的C#交换
this.myLabel1.BorderShadow = true;
this.myLabel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
,我需要得到这个:
this.myLabel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.myLabel1.BorderShadow = true;
如何这样做是Form.Desinger.cs自动完成? 如果你说为什么?
private bool BorderShadow_ = false;
public bool BorderShadow
{
get
{
return BorderShadow_;
}
set
{
if (Border_Style_ == BorderStyle.FixedSingle)
{
BorderShadow_ = value;
}
else
{
throw new ArgumentOutOfRangeException("BorderShadow", "BorderShadow can be true if BorderStyle=FixedSingle");
}
}
}
什么在'你want'什么区别和'你得到什么'? – Rohit
交换Desinger属性。 – Zuhan
这样做的意义何在?如果BorderStyle没有设置为BorderStyle.FixedSingle,为什么不忽略'BorderShadow'呢? –