/// <summary> /// Metoda vypočte reálné souřadnice Bounds do this grupy a jejích grafických items. /// Metoda při opakovaném volání skutečně přepočítá hodnoty. /// </summary> public void CalculateBounds() { Int32Range groupY = this.CoordinateYVisual; if (this.ControlBuffered.CoordinateX == null) { this.Graph.CheckValidCoordinateX(); return; } this.ControlBuffered.Bounds = Int32Range.GetRectangle(this.ControlBuffered.CoordinateX, groupY); // Child prvky mají svoje souřadnice (Bounds) relativní k this prvku (který je jejich parentem), proto mají Y souřadnici { 0 až this.Y.Size }: Int32Range itemY = new Int32Range(0, groupY.Size); foreach (ITimeGraphItem item in this.Items) { item.VisualControl.Bounds = Int32Range.GetRectangle(item.VisualControl.CoordinateX, itemY); } this._IsValidBounds = true; }