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 Media
Declaration
public MediaWithCrops(IPublishedContent content, ImageCropperValue localCrops)
Parameters
Type | Name | Description |
---|---|---|
IPublished |
content | The content. |
Image |
localCrops | The local crops. |
Properties
View SourceContent
Gets the content/media item.
Declaration
public IPublishedContent Content { get; }
Property Value
Type | Description |
---|---|
IPublished |
The content/media item. |
LocalCrops
Gets the local crops.
Declaration
public ImageCropperValue LocalCrops { get; }
Property Value
Type | Description |
---|---|
Image |
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 |
---|---|
IPublished |
The media item. |