Show / Hide Table of Contents

Class AdaptiveImageBlockController

Used to provide default rendering of adaptive images in site templates, e.g. when using PropertyFor.

Inheritance
object
ViewComponent
AsyncPartialContentComponent<AdaptiveImage>
AsyncBlockComponent<AdaptiveImage>
AdaptiveImageBlockController
Implements
IRenderTemplate<AdaptiveImage>
IRenderTemplate
Inherited Members
AsyncPartialContentComponent<AdaptiveImage>.InvokeAsync(AdaptiveImage)
ViewComponent.Content(string)
ViewComponent.View()
ViewComponent.View(string)
ViewComponent.View<TModel>(TModel)
ViewComponent.View<TModel>(string, TModel)
ViewComponent.HttpContext
ViewComponent.Request
ViewComponent.User
ViewComponent.UserClaimsPrincipal
ViewComponent.RouteData
ViewComponent.ViewBag
ViewComponent.ModelState
ViewComponent.Url
ViewComponent.ViewComponentContext
ViewComponent.ViewContext
ViewComponent.ViewData
ViewComponent.TempData
ViewComponent.ViewEngine
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: AdaptiveImages.Controllers
Assembly: AdaptiveImages.dll
Syntax
[TemplateDescriptor(Inherited = true)]
public class AdaptiveImageBlockController : AsyncBlockComponent<AdaptiveImage>, IRenderTemplate<AdaptiveImage>, IRenderTemplate

Constructors

AdaptiveImageBlockController()

Creates an instance and initializes required dependencies.

Declaration
public AdaptiveImageBlockController()

Methods

InvokeComponentAsync(AdaptiveImage)

Renders markup, i.e. <picture> element, for an adaptive image.

Declaration
protected override Task<IViewComponentResult> InvokeComponentAsync(AdaptiveImage currentContent)
Parameters
Type Name Description
AdaptiveImage currentContent

The block representing an AdaptiveImage property.

Returns
Type Description
Task<IViewComponentResult>
Overrides
AsyncPartialContentComponent<AdaptiveImage>.InvokeComponentAsync(AdaptiveImage)

Implements

EPiServer.Web.IRenderTemplate<TModel>
EPiServer.Web.IRenderTemplate

Extension Methods

ImageExtensions.GetCultureSpecificImageAttribute<TContent, TProperty>(TContent, Expression<Func<TContent, TProperty>>)
ImageExtensions.GetImageConstraints<TParent>(TParent, string)
ImageExtensions.GetImageConstraints<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>)
ImageExtensions.GetImageRenderSettings<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>)
ImageExtensions.GetImageRenderSettings<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>, FormFactor)
ImageExtensions.GetProportionsConstraint<TParent>(TParent, string)
ImageExtensions.GetProportionsConstraint<TParent>(TParent, string, FormFactor)
ImageExtensions.GetProportionsConstraint<TParent, TProperty>(TParent, Expression<Func<TParent, TProperty>>)
ImageExtensions.GetRequiredImageAttribute<TContent, TProperty>(TContent, Expression<Func<TContent, TProperty>>)
ImageExtensions.GetSizeConstraint<TContent, TProperty>(TContent, Expression<Func<TContent, TProperty>>)
☀
☾
In this article
Back to top
Documentation applies to: Adaptive Images 2.x
☀
☾