internal ControlState GetChild(String location, bool create) { if (location == null) { return(this); } int dotindex = location.IndexOf('.'); String childname = null; String childns = null; if (dotindex == -1) { childname = location; } else { childname = location.Substring(0, dotindex); childns = location.Substring(dotindex + 1); } if (!children.ContainsKey(childname) && create) { ControlState cs = new ControlState(this); children[childname] = cs; } if (children.ContainsKey(childname)) { return(children[childname].GetChild(childns, create)); } else { return(null); } }
private ControlState(ControlState p) { parent = p; }
/// <summary> /// Clears all current control bindings. /// </summary> public void ClearBindings() { rootcstate = new ControlState(); }
private ControlState(ControlState p) { parent = p; }
public ControlState() { parent = null; }
internal ControlState GetChild(String location, bool create) { if (location == null) return this; int dotindex = location.IndexOf('.'); String childname = null; String childns = null; if (dotindex == -1) childname = location; else { childname = location.Substring(0, dotindex); childns = location.Substring(dotindex + 1); } if (!children.ContainsKey(childname) && create) { ControlState cs = new ControlState(this); children[childname] = cs; } if (children.ContainsKey(childname)) return children[childname].GetChild(childns, create); else return null; }
/// <summary> /// Clears all current control bindings. /// </summary> public void ClearBindings() { rootcstate = new ControlState(); }