System.Windows.Forms.ContainerControl.PerformAutoScale C# (CSharp) Method

PerformAutoScale() private method

private PerformAutoScale ( bool called_by_scale ) : void
called_by_scale bool
return void
		internal void PerformAutoScale (bool called_by_scale)
		{
			if ((AutoScaleMode == AutoScaleMode.Inherit) && !called_by_scale)
				return;

			if ((layout_suspended > 0) && !called_by_scale) {
				auto_scale_pending = true;
				return;
			}
			// Set this first so we don't get called again from
			// PerformDelayedAutoScale after ResumeLayout
			auto_scale_pending = false;

			SizeF factor = AutoScaleFactor;
			
			
			// 11 Feb 2011 S. Baer
			// TODO: Fix autoscaling. This is messing up the layout with MonoMac
			// Just set AutoScaleFactor to always 1,1 to eliminate any scaling
			// Remove the following line to debug and track down what is going wrong
			factor = new SizeF(1F,1F);
			
			
			
			if (AutoScaleMode == AutoScaleMode.Inherit) {
				ContainerControl cc = FindContainer (this.Parent);
				if (cc != null)
					factor = cc.AutoScaleFactor;
			}
			if (factor != new SizeF (1F, 1F)) {
				is_auto_scaling = true;
				SuspendLayout ();
				Scale (factor);
				ResumeLayout (false);
				is_auto_scaling = false;
			}

			auto_scale_dimensions = CurrentAutoScaleDimensions;
		}

Same methods

ContainerControl::PerformAutoScale ( ) : void