Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am having issues trying to Set the crop mode. I am using:
@item.HeaderImage.GetCropUrl(1140,568,imageCropMode: ImageCropMode.Crop)
I have also tried:
@Url.GetCropUrl(item.HeaderImage, 1140, 568, imageCropMode: ImageCropMode.Crop)
I keep getting this error:
Compiler Error Message: CS0103: The name 'ImageCropMode' does not exist in the current context
What am I doing wrong here?
Hi Kris
Add to the top of the document:
@using Umbraco.Web.Models
Thanks,
Alex
Is there a way to do this globally? like in the web.config?
<add namespace="Umbraco.Core.Models" />
Add that to /Views/Web.config in this section
<system.web.webPages.razor> <pages pageBaseType="System.Web.Mvc.WebViewPage"> <namespaces>
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
The name 'ImageCropMode' does not exist in the current context
I am having issues trying to Set the crop mode. I am using:
I have also tried:
I keep getting this error:
What am I doing wrong here?
Hi Kris
Add to the top of the document:
Thanks,
Alex
Is there a way to do this globally? like in the web.config?
Add that to /Views/Web.config in this section
is working on a reply...