Table of Contents

Class FileViewModel

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll
FileViewModel represents the rendering context used when a file is rendered.
public class FileViewModel : ViewModelBase
Inheritance
FileViewModel
Inherited Members

Constructors

FileViewModel()

Initializes a new instance of the FileViewModel class.
public FileViewModel()
See Also

Properties

Extension

Gets or sets the extension.
public string Extension { get; set; }

Property Value

string
The extension.
See Also

FocalPositionFromLeft

Gets the focal points position from the left edge of the image in percentage.
public int FocalPositionFromLeft { get; }

Property Value

int
A number between 0 and 100 that tells in percent how far from the left of the image the focal point is on the x-axis (horistontal)
See Also

FocalPositionFromTop

Gets the focal points position from the top edge of the image in percentage.
public int FocalPositionFromTop { get; }

Property Value

int
A number between 0 and 100 that tells in percent how far from the top of the image the focal point is on the y-axis (vertical)
See Also

FocalX

Gets or sets the x axis focal point.
public int FocalX { get; set; }

Property Value

int
A number between -100 and 100 that tells in percent how far from the middle of the image the focal point is on the x-axis

Remarks

Negative numbers are left of the middle, positive right of the middle
See Also

FocalY

Gets or sets the y axis focal point.
public int FocalY { get; set; }

Property Value

int
A number between -100 and 100 that tells in percent how far from the middle of the image the focal point is on the y-axis

Remarks

Negative numbers are below the middle, positive above the middle
See Also

Name

Gets or sets the name.
public string Name { get; set; }

Property Value

string
The name.
See Also

Path

Gets or sets the path.
public string Path { get; set; }

Property Value

string
The path.
See Also

PathUrlEncoded

Gets the path to the file in url encoded format for use in Urls, i.e. GetImage.ashx and Download.aspx.
public string PathUrlEncoded { get; }

Property Value

string
See Also

Methods

GetFocalPointParameters()

Returns a focal point parameter string for use with GetImage.ashx.
public string GetFocalPointParameters()

Returns

string

Remarks

Returns focal point in the format: x=75&y=23 If focal points are not defined (if they are both 0) this method returns an empty string.
See Also

HasFocalPoint()

Detects if the current image has at least one focal point set.
public bool HasFocalPoint()

Returns

bool
See Also

ToString()

Returns the path.
public override string ToString()

Returns

string
See Also

See Also

To top