Example #1
0
        /// <summary>
        /// apply the window position adjustment to convert the position relative to
        /// the window to position relative to parent of the window.
        /// </summary>
        /// <param name="AdjustRowCol"></param>
        /// <param name="LocalPos"></param>
        /// <returns></returns>
        public static IRowCol ParentPosToLocalPos(
            this IRowCol AdjustRowCol, IRowCol ParentPos)
        {
            IRowCol localPos = null;

            if (AdjustRowCol == null)
            {
                localPos = ParentPos;
            }
            else
            {
                localPos = ParentPos.Sub(AdjustRowCol);
            }
            return(localPos);
        }