Esempio n. 1
0
        /// <summary>
        /// Force a re-layout of the view starting with this control. This is raised when
        /// the layout determines that the control size has changed asynchronously.
        /// </summary>
        public void RaiseRelayout()
        {
            if (InvokeRequired)
            {
                // Make sure UI code is run on the main thread in the case where we're fired
                // from within a different thread.
                Invoke((MethodInvoker)(RaiseRelayout));
                return;
            }

            _height = -1;
            if (!_view.IsLayoutSuspended)
            {
                CanvasItemLayout.Bounds = DrawRectangle;
                _view.LayoutControls(this);
            }
        }