/// <summary> /// Ensure the border to the auxillary box always contains the contents of the box /// </summary> protected void UpdateAuxillaryBoxBorder() { //If there is already a border, remove it if (AuxillaryBoxBorder != null && AuxillaryBox.IndexOfChild(AuxillaryBoxBorder) > 0) { AuxillaryBox.RemoveChild(AuxillaryBoxBorder); } //Create a new border that contains the contents of the box AuxillaryBoxBorder = PPath.CreateRectangle(Background.Bounds.Left, Background.Bounds.Bottom, Background.Bounds.Width, AuxillaryBox.UnionOfChildrenBounds.Height); AuxillaryBox.AddChild(AuxillaryBoxBorder); AuxillaryBoxBorder.MoveToBack(); }