他のプロパティを含むプロパティを設定したい場合は、次のようにします。場所とフォントプロパティのデザイン時の動作を複製する方法(例を挙げて)
設計時に同じ動作を実現するにはどうすればよいclass Example:DataGridView
{
private PlusProperties X;
public Example()
{
X = new PlusProperties();
AdditionalProperties = X;
}
[ComVisibleAttribute(true)]
[System.ComponentModel.Browsable(true), System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)]
[System.ComponentModel.DesignerSerializationVisibility(System.ComponentModel.DesignerSerializationVisibility.Content)]
public PlusProperties AdditionalProperties
{
get { return X; }
set
{
X = value;
}
}
}
public class PlusProperties
{
private Color Pcolor = Color.DimGray;
private Color Ccolor = Color.DimGray;
public PlusProperties()
{
}
[System.ComponentModel.Browsable(true), System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)]
public Color ParentColor
{
get { return Pcolor; }
set
{
if (value != Pcolor)
{
Pcolor = value;
}
}
}
[System.ComponentModel.Browsable(true), System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Always)]
public Color ChildColor
{
get { return Ccolor; }
set
{
if (value != Ccolor)
{
Ccolor = value;
}
}
}
}
(私はクラスのプロパティを表示する意味)?
ご協力いただきありがとうございます。
「ExpanableObjectConverter」(属性)が必要です – Plutonix