public override MinMaxWidth GetMinMaxWidth() { MinMaxWidth minMaxWidth = new MinMaxWidth(); float? rotation = this.GetPropertyAsFloat(Property.ROTATION_ANGLE); if (!SetMinMaxWidthBasedOnFixedWidth(minMaxWidth)) { float?minWidth = HasAbsoluteUnitValue(Property.MIN_WIDTH) ? RetrieveMinWidth(0) : null; float?maxWidth = HasAbsoluteUnitValue(Property.MAX_WIDTH) ? RetrieveMaxWidth(0) : null; if (minWidth == null || maxWidth == null) { bool restoreRotation = HasOwnProperty(Property.ROTATION_ANGLE); SetProperty(Property.ROTATION_ANGLE, null); MinMaxWidthLayoutResult result = (MinMaxWidthLayoutResult)Layout(new LayoutContext(new LayoutArea(1, new Rectangle (MinMaxWidthUtils.GetInfWidth(), AbstractRenderer.INF)))); if (restoreRotation) { SetProperty(Property.ROTATION_ANGLE, rotation); } else { DeleteOwnProperty(Property.ROTATION_ANGLE); } minMaxWidth = result.GetMinMaxWidth(); } if (minWidth != null) { minMaxWidth.SetChildrenMinWidth((float)minWidth); } if (maxWidth != null) { minMaxWidth.SetChildrenMaxWidth((float)maxWidth); } if (minMaxWidth.GetChildrenMinWidth() > minMaxWidth.GetChildrenMaxWidth()) { minMaxWidth.SetChildrenMaxWidth(minMaxWidth.GetChildrenMaxWidth()); } } else { minMaxWidth.SetAdditionalWidth(CalculateAdditionalWidth(this)); } return(rotation != null?RotationUtils.CountRotationMinMaxWidth(minMaxWidth, this) : minMaxWidth); }