C# Class Our.Umbraco.Picture.PictureExtensions

Afficher le fichier Open project: rasmuseeg/Our.Umbraco.Picture

Méthodes publiques

Méthode Description
Alt ( this picture, string alt ) : IPictureElement

Sets the alt attribute on the img element.

Attr ( this picture, string key, string value ) : IPictureElement

Adds the following attribute and value to picture element.

Attrs ( this picture, string>.Dictionary attrs ) : IPictureElement

Adds the following attributes and values to picture element.

Html ( this picture ) : IHtmlString

Convert to HtmlString

Picture ( this helper ) : IPictureElement

Creates an empty picture element.

RenderPicture ( this helper, IPictureElement picture ) : IHtmlString

Returns the html of picture element with sources and attributes.

Source ( this picture, string media ) : IPictureElement

Adds new source with specified media and srcsets.

Src ( this picture, string src ) : IPictureElement

You should leave this empty

Srcset ( this picture ) : IPictureElement

Add multiple sources in the srcset attribute on img element

Private Methods

Méthode Description
RenderHere ( this picture ) : void

Method Details

Alt() public static méthode

Sets the alt attribute on the img element.
public static Alt ( this picture, string alt ) : IPictureElement
picture this
alt string
Résultat IPictureElement

Attr() public static méthode

Adds the following attribute and value to picture element.
public static Attr ( this picture, string key, string value ) : IPictureElement
picture this
key string
value string
Résultat IPictureElement

Attrs() public static méthode

Adds the following attributes and values to picture element.
public static Attrs ( this picture, string>.Dictionary attrs ) : IPictureElement
picture this
attrs string>.Dictionary
Résultat IPictureElement

Html() public static méthode

Convert to HtmlString
public static Html ( this picture ) : IHtmlString
picture this
Résultat IHtmlString

Picture() public static méthode

Creates an empty picture element.
public static Picture ( this helper ) : IPictureElement
helper this
Résultat IPictureElement

RenderPicture() public static méthode

Returns the html of picture element with sources and attributes.
public static RenderPicture ( this helper, IPictureElement picture ) : IHtmlString
helper this
picture IPictureElement
Résultat IHtmlString

Source() public static méthode

Adds new source with specified media and srcsets.
public static Source ( this picture, string media ) : IPictureElement
picture this
media string
Résultat IPictureElement

Src() public static méthode

You should leave this empty
public static Src ( this picture, string src ) : IPictureElement
picture this
src string
Résultat IPictureElement

Srcset() public static méthode

Add multiple sources in the srcset attribute on img element
public static Srcset ( this picture ) : IPictureElement
picture this
Résultat IPictureElement