紧急求助:自定义控件类之间属性传递的问题。
我写了一个自定义控件WebInfoPath,它包括两个属性:MasterTables 和 XmlFilePath。
MasterTables 是一个集合属性由 MasterTableCollection来控制的。
MasterTables由MasterTableCollectionEditor来控制设计期的属性实现.MasterTables的子项是
MasterTable类. MasterTable类包括一个Name属性,该属性由TableNameConverter来实现设计器的
下拉选择,但是TableNameConverter获得下拉的内容时,必须以WebInfopath的XmlFilePath,作为参数,请问如何将该参数传到TableNameConverter。
代码如下:
[DesignerSerializationVisibility
(DesignerSerializationVisibility.Content),
NotifyParentProperty(true),
PersistenceMode(PersistenceMode.InnerProperty),
EditorAttribute(typeof(HypHappy.WebInfopath.MasterTableCollectionEditor),
typeof(UITypeEditor))]
public MasterTables MasterTables
{
get
{
if(_MasterTables == null)
{
_MasterTables = new MasterTables();
if (IsTrackingViewState)
{
((IStateManager)
_MasterTables).TrackViewState();
}
}
return _MasterTables;
}
}