SizeConstraintSize Method |
Creates a new size constraint that makes the image resize to the specified width and height. This constraint does not maintain the aspect ratio. The resized image is never made larger than the original.
Namespace: Kentico.Content.Web.MvcAssembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax public static SizeConstraint Size(
int width,
int height
)
Parameters
- width
- Type: SystemInt32
The width of the resized image. - height
- Type: SystemInt32
The height of the resized image.
Return Value
Type:
SizeConstraintThe new size constraint that makes the image resize to the specified width and height.
Exceptions Exception | Condition |
---|
ArgumentOutOfRangeException | Width or height is less than or equal to 0. |
See Also