Click or drag to resize
SizeConstraint Structure
Represents a size constraint that can be enforced on image when resizing.

Namespace: Kentico.Content.Web.Mvc
Assembly: Kentico.Content.Web.Mvc (in Kentico.Content.Web.Mvc.dll) Version: 12.0.0
Syntax
C#
public struct SizeConstraint

The SizeConstraint type exposes the following members.

Fields
  NameDescription
Public fieldStatic memberEmpty
Gets a SizeConstraint structure that has width, height and maximum width or height of 0.
Top
Properties
  NameDescription
Public propertyHeightComponent
Gets the desired image height, in pixels.
Public propertyIsEmpty
Tests whether this structure has width, height and maximum width or height of 0.
Public propertyMaxWidthOrHeightComponent
Gets the desired maximum image width or height.
Public propertyWidthComponent
Gets the desired image width, in pixels.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is a SizeConstraint structure with the same width, height and maximum width or height as this SizeConstraint structure.
(Overrides ValueTypeEquals(Object).)
Public methodGetHashCode
Returns a hash code for this SizeConstraint structure.
(Overrides ValueTypeGetHashCode.)
Public methodStatic memberHeight
Creates a new size constraint that makes the image resize to the specified height. This constraint maintains the aspect ratio. The resized image is never made larger than the original.
Public methodStatic memberMaxWidthOrHeight
Creates a new size constraint that makes the image resize to the width and height that do not exceed the specified value. This constraint maintains the aspect ratio. The resized image is never made larger than the original.
Public methodStatic memberSize
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.
Public methodToString
Creates a human-readable string that represents this SizeConstraint structure.
(Overrides ValueTypeToString.)
Public methodStatic memberWidth
Creates a new size constraint that makes the image resize to the specified width. This constraint maintains the aspect ratio. The resized image is never made larger than the original.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two SizeConstraint structures are equal.
Public operatorStatic memberInequality
Determines whether two SizeConstraint structures are different.
Top
See Also