子コントロールから親にプロパティを伝達する方法はありますParent.Property1
かParent.Child.Property1
? 私は継承を使用できません-私の親は子の型を拡張できません-別のクラスから継承されます。
また、次のような子から親への各プロパティのコードを追加したくありません。
public object Property1
{
get{ return Child.Property1; }
set{ ChildProperty1 = value; }
}
たぶんリフレクションを使用しています-このようなものですか?
public PropertyInfo[] Properties
{
get{ return Child.GetType().GetProperties(); }
set{ Child.GetType().GetProperties().SetValue() = value.GetValue()}
}
ありがとう