Beispiel #1
0
        ///// <summary>
        ///// Answer an otherwise identical LayoutTransform with the specified maximum layout width.
        ///// </summary>
        ///// <param name="maxWidth"></param>
        ///// <returns></returns>
        //public LayoutInfo WithMaxWidth(int maxWidth)
        //{
        //    LayoutInfo result = (LayoutInfo)MemberwiseClone();
        //    result.MaxWidth = maxWidth;
        //    return result;
        //}

        /// <summary>
        /// Answer an otherwise identical LayoutTransform with the specified maximum layout width,
        /// adjusted appropriately for a child box of a box with Left = dx, Top = dy.
        /// Should be consistent with LayoutTransform.OffsetBy.
        /// </summary>
        public LayoutInfo WithMaxWidthOffsetBy(int maxWidth, int dx, int dy)
        {
            LayoutInfo result = (LayoutInfo)MemberwiseClone();

            result.MaxWidth = maxWidth;
            result.InitializeOnlyOffsetBy(dx, dy);
            return(result);
        }