public class TreeView : TemplatedGroup
{
GraphicObject selectedItemContainer = null;
- Color selBackground;
- Color selForeground;
bool isRoot;
-
+ #region CTOR
public TreeView () : base()
{
}
+ #endregion
+
[XmlAttributeAttribute()][DefaultValue(false)]
public virtual bool IsRoot {
get { return isRoot; }
}
}
- [XmlAttributeAttribute][DefaultValue("SteelBlue")]//DeepJungleGreen
- public virtual Color SelectionBackground {
- get { return selBackground; }
- set {
- if (value == selBackground)
- return;
- selBackground = value;
- NotifyValueChanged ("SelectionBackground", selBackground);
- RegisterForRedraw ();
- }
- }
- [XmlAttributeAttribute][DefaultValue("White")]
- public virtual Color SelectionForeground {
- get { return selForeground; }
- set {
- if (value == selForeground)
- return;
- selForeground = value;
- NotifyValueChanged ("SelectionForeground", selForeground);
- RegisterForRedraw ();
- }
- }
-
[XmlIgnore]public override object SelectedItem {
get {
return selectedItemContainer == null ?
public void CreateExpandDelegate (TemplatedGroup host){
Type dataType = Type.GetType(strDataType);
- Type hostType = typeof(TemplatedGroup);//not sure is the best place to put the dyn method
+ Type tmpGrpType = typeof(TemplatedGroup);
+ Type hostType = tmpGrpType;//not sure is the best place to put the dyn method
Type evtType = typeof(EventHandler);
- Type listBoxType = typeof(ListBox);
+
MethodInfo evtInvoke = evtType.GetMethod ("Invoke");
ParameterInfo [] evtParams = evtInvoke.GetParameters ();
MethodInfo miGetDatas = dataType.GetMethod (fetchMethodName, new Type[] {});
il.Emit (OpCodes.Callvirt, miGetDatas);
- il.Emit (OpCodes.Callvirt, listBoxType.GetProperty("Data").GetSetMethod ());
+ il.Emit (OpCodes.Callvirt, tmpGrpType.GetProperty("Data").GetSetMethod ());
il.Emit (OpCodes.Ret);