Class MediaWithCrops
Represents a media item with local crops.
Namespace: Umbraco.Core.Models
Assembly: Umbraco.Core.dll
Syntax
public class MediaWithCrops : PublishedContentWrapped, IPublishedContent, IPublishedElement
Constructors
View SourceMediaWithCrops(IPublishedContent, ImageCropperValue)
Initializes a new instance of the MediaWithCrops class.
Declaration
public MediaWithCrops(IPublishedContent content, ImageCropperValue localCrops)
Parameters
Type | Name | Description |
---|---|---|
IPublishedContent | content | The content. |
ImageCropperValue | localCrops | The local crops. |
Properties
View SourceContent
Gets the content/media item.
Declaration
public IPublishedContent Content { get; }
Property Value
Type | Description |
---|---|
IPublishedContent | The content/media item. |
LocalCrops
Gets the local crops.
Declaration
public ImageCropperValue LocalCrops { get; }
Property Value
Type | Description |
---|---|
ImageCropperValue | The local crops. |
MediaItem
Gets the media item.
Declaration
[Obsolete("This instance now implements IPublishedContent by wrapping the media item, use the extension methods directly on MediaWithCrops or use the Content property to get the media item instead.")]
public IPublishedContent MediaItem { get; }
Property Value
Type | Description |
---|---|
IPublishedContent | The media item. |