C# Класс Our.Umbraco.Picture.PictureExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
RenderHere ( this picture ) : void

Описание методов

Alt() публичный статический Метод

Sets the alt attribute on the img element.
public static Alt ( this picture, string alt ) : IPictureElement
picture this
alt string
Результат IPictureElement

Attr() публичный статический Метод

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
Результат IPictureElement

Attrs() публичный статический Метод

Adds the following attributes and values to picture element.
public static Attrs ( this picture, string>.Dictionary attrs ) : IPictureElement
picture this
attrs string>.Dictionary
Результат IPictureElement

Html() публичный статический Метод

Convert to HtmlString
public static Html ( this picture ) : IHtmlString
picture this
Результат IHtmlString

Picture() публичный статический Метод

Creates an empty picture element.
public static Picture ( this helper ) : IPictureElement
helper this
Результат IPictureElement

RenderPicture() публичный статический Метод

Returns the html of picture element with sources and attributes.
public static RenderPicture ( this helper, IPictureElement picture ) : IHtmlString
helper this
picture IPictureElement
Результат IHtmlString

Source() публичный статический Метод

Adds new source with specified media and srcsets.
public static Source ( this picture, string media ) : IPictureElement
picture this
media string
Результат IPictureElement

Src() публичный статический Метод

You should leave this empty
public static Src ( this picture, string src ) : IPictureElement
picture this
src string
Результат IPictureElement

Srcset() публичный статический Метод

Add multiple sources in the srcset attribute on img element
public static Srcset ( this picture ) : IPictureElement
picture this
Результат IPictureElement