ScrollBar.GetScaledBounds Method (Rectangle, SizeF, BoundsSpecified)


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Returns the bounds to use when the ScrollBar is scaled by a specified amount.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

protected override Rectangle GetScaledBounds(
	Rectangle bounds,
	SizeF factor,
	BoundsSpecified specified


Type: System.Drawing.Rectangle

A Rectangle that specifies the initial bounds.

Type: System.Drawing.SizeF

A SizeF that indicates the amount the current bounds should be increased by.

Type: System.Windows.Forms.BoundsSpecified

A bitwise combination of the BoundsSpecified values that indicate the how to define the control's size and position returned by GetScaledBounds.

Return Value

Type: System.Drawing.Rectangle

A Rectangle specifying the scaled bounds.

This is a helper method that used by the ScaleControl method to return the bounds that the control should be scaled by. You may override this method if you wish to reuse ScaleControl scaling logic, but you need to supply your own bounds.

.NET Framework
Available since 2.0
Return to top