Пример #1
0
        /// <summary>
        /// Returns the minimum required size of the current cell, calculating using the current DisplayString, Image and Borders informations.
        /// </summary>
        /// <param name="cellContext"></param>
        /// <param name="maxLayoutArea">SizeF structure that specifies the maximum layout area for the text. If width or height are zero the value is set to a default maximum value.</param>
        /// <returns></returns>
        public Size Measure(CellContext cellContext,
                            Size maxLayoutArea)
        {
            using (DevAge.Drawing.MeasureHelper measure = new DevAge.Drawing.MeasureHelper(cellContext.Grid))
            {
                PrepareView(cellContext);

                SizeF measureSize = Measure(measure, SizeF.Empty, maxLayoutArea);
                return(Size.Ceiling(measureSize));
            }
        }
Пример #2
0
        /// <summary>
        /// Returns the minimum required size of the current cell, calculating using the current DisplayString, Image and Borders informations.
        /// </summary>
        /// <param name="cellContext"></param>
        /// <param name="maxLayoutArea">SizeF structure that specifies the maximum layout area for the text. If width or height are zero the value is set to a default maximum value.</param>
        /// <returns></returns>
        public Size Measure(CellContext cellContext,
			Size maxLayoutArea)
        {
            using (DevAge.Drawing.MeasureHelper measure = new DevAge.Drawing.MeasureHelper(cellContext.Grid))
            {
                PrepareView(cellContext);

                SizeF measureSize = Measure(measure, SizeF.Empty, maxLayoutArea);
                return Size.Ceiling(measureSize);
            }
        }