SourceGrid.GridVirtual.PerformStretch C# (CSharp) Méthode

PerformStretch() private méthode

Recalculate the scrollbar position and value based on the current cells, scroll client area, linked controls and more. If redraw == false this method has not effect. This method is called when you put Redraw = true;
private PerformStretch ( ) : void
Résultat void
        private void PerformStretch()
        {
            if (AutoStretchColumnsToFitWidth || AutoStretchRowsToFitHeight)
            {
                if (AutoStretchColumnsToFitWidth && AutoStretchRowsToFitHeight)
                {
                    Rows.AutoSize(false);
                    Columns.AutoSize(false);
                    Columns.StretchToFit();
                    Rows.StretchToFit();
                }
                else if (AutoStretchColumnsToFitWidth)
                {
                    Columns.AutoSize(true);
                    Columns.StretchToFit();
                }
                else if (AutoStretchRowsToFitHeight)
                {
                    Rows.AutoSize(true);
                    Rows.StretchToFit();
                }
            }
        }