C#, C♯, C#相談室 Part91 [無断転載禁止]©5ch.io
■ このスレッドは過去ログ倉庫に格納されています
0423デフォルトの名無しさん
2016/12/09(金) 01:37:38.58ID:nk5rcDEaとりあえずこんな感じ
public class TestCmb : ComboBox
{
[DesignerSerializationVisibility(DesignerSerializationVisibility.Content)]
public FontAndColorSetCollection TestProperty { get; set; } = new FontAndColorSetCollection();
}
//[Serializable] これいらない
public class FontAndColorSet
{
public Font Font { get; set; }
public Color Color { get; set; }
}
public class FontAndColorSetCollection : Collection<FontAndColorSet>
{
public void AddRange(FontAndColorSet[] items)
{
foreach (var x in items)
this.Items.Add(x);
}
}
ここが参考になる
https://www.codeproject.com/articles/5372/how-to-edit-and-persist-collections-with-collectio
■ このスレッドは過去ログ倉庫に格納されています