Exemple #1
0
        /// <summary>
        /// Set draw area to all form client space except toolbar
        /// </summary>
        private void ResizeDrawArea()
        {
            var bounds = drawArea.GetBounds();

            //drawArea.Left = 0;
            //drawArea.Top = 0;
            drawArea.Width  = Math.Max(this.pnlDrawArea.ClientRectangle.Width, (int)Math.Round((bounds.Left + bounds.Width + 10) * drawArea.Zoom));
            drawArea.Height = Math.Max(this.pnlDrawArea.ClientRectangle.Height, (int)Math.Round((bounds.Top + bounds.Height + 10) * drawArea.Zoom));
            this.pnlDrawArea.Invalidate();
            ;
        }