private SD.Rectangle GetBoundingRectangle() { List <SWF.Control> controls = InstancesTracker.GetControlsFromProvider(this); if (controls == null) { return(SD.Rectangle.Empty); } SD.Rectangle bounding = controls [0].Bounds; for (int i = 1; i < controls.Count; i++) { bounding = SD.Rectangle.Union(bounding, controls [i].Bounds); } return(bounding); }
public void AddControl(SWF.Control control) { if (parent == null) { parent = InstancesTracker.GetParentFromControl(control); } if (controls.Contains(control) == false) { controls.Add(control); if (controls.Count == 1 && control.Visible == true) { FragmentRootControlProvider root = (FragmentRootControlProvider)ProviderFactory.GetProvider(Parent); root.AddChildProvider(this); } control.VisibleChanged += new EventHandler(OnControlVisibleChanged); } }