public void Measure(Vector2 parentAvailableSize) { MeasureOverride(parentAvailableSize); if (DesiredSize.X != float.PositiveInfinity && DesiredSize.Y != float.PositiveInfinity) { BoundingRectangle boundingRectangle = TransformBoundsToParent(DesiredSize); m_parentDesiredSize = boundingRectangle.Size(); m_parentOffset = -boundingRectangle.Min; } else { m_parentDesiredSize = DesiredSize; m_parentOffset = Vector2.Zero; } }