Click or drag to resize
IFileUrlExtensionsWithSizeConstraint Method
Provides size constraints to the file URL if file represents an image based on given parameters.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
public static IFileUrl WithSizeConstraint(
	this IFileUrl url,
	SizeConstraint constraint
)

Parameters

url
Type: Kentico.Content.Web.MvcIFileUrl
File URL.
constraint
Type: Kentico.Content.Web.MvcSizeConstraint
Size constraint.

Return Value

Type: IFileUrl
New instance of IFileUrl based on the current state modified by the parametrization.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IFileUrl. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
The original file URL instance is not modified by the parametrization.
See Also