GetPreferredSize() public method

Discover the preferred size of the element.
public GetPreferredSize ( ViewLayoutContext context ) : Size
context ViewLayoutContext Layout context.
return System.Drawing.Size
Esempio n. 1
0
        /// <summary>
        /// Discover the preferred size of the element.
        /// </summary>
        /// <param name="context">Layout context.</param>
        public override Size GetPreferredSize(ViewLayoutContext context)
        {
            Debug.Assert(context != null);
            Debug.Assert(_drawCanvas != null);

            // Ensure that child elements have correct palette state
            CheckPaletteState(context);

            // Delegate work to the child canvas
            return(_drawCanvas.GetPreferredSize(context));
        }