C# Class Our.Umbraco.Picture.TypedPictureExtensions

显示文件 Open project: rasmuseeg/Our.Umbraco.Picture

Public Methods

Method Description
Picture ( this content ) : TypedPictureElement

Creates a new picture from an IPublishedContent to manipulate.

Picture ( this helper, IPublishedContent content ) : TypedPictureElement

Creates a new picture from an IPublishedContent to manipulate.

Source ( this picture, string media, int width, int height = null ) : TypedPictureElement

Adds new source element with specified media, width and or height.

Srcset ( this picture, int width, int height = null ) : TypedPictureElement

Adds srcset to picture img elemet with specefied height and width.

Method Details

Picture() public static method

Creates a new picture from an IPublishedContent to manipulate.
public static Picture ( this content ) : TypedPictureElement
content this
return Our.Umbraco.Picture.Models.TypedPictureElement

Picture() public static method

Creates a new picture from an IPublishedContent to manipulate.
public static Picture ( this helper, IPublishedContent content ) : TypedPictureElement
helper this
content IPublishedContent
return Our.Umbraco.Picture.Models.TypedPictureElement

Source() public static method

Adds new source element with specified media, width and or height.
public static Source ( this picture, string media, int width, int height = null ) : TypedPictureElement
picture this
media string
width int
height int
return Our.Umbraco.Picture.Models.TypedPictureElement

Srcset() public static method

Adds srcset to picture img elemet with specefied height and width.
public static Srcset ( this picture, int width, int height = null ) : TypedPictureElement
picture this
width int
height int
return Our.Umbraco.Picture.Models.TypedPictureElement