New to Telerik UI for ASP.NET MVC? Start a free 30-day trial

Defines the fluent API for configuring the ImageBrowser.

Definition

Namespace:Kendo.Mvc.UI.Fluent

Assembly:Kendo.Mvc.dll

Syntax:

C#
public class EditorImageBrowserSettingsBuilder

Inheritance: objectEditorImageBrowserSettingsBuilder

Inherited Members object.GetType()object.MemberwiseClone()object.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()...

Constructors

Initializes a new instance of the EditorImageBrowserSettingsBuilder class.

C#
public EditorImageBrowserSettingsBuilder(EditorImageBrowserSettings settings, ViewContext viewContext, IUrlGenerator urlGenerator)
Parameters:settingsEditorImageBrowserSettings

The Image Browser settings.

viewContextViewContext

The view context

urlGeneratorIUrlGenerator

The URL generator.

Methods

Configures the URL for directory create operation.

C#
public EditorImageBrowserSettingsBuilder Create(Action<EditorImageBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorImageBrowserOperationBuilder>

The action which configures the Create Action.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Create(create =&gt; create.Action("CreateDirectory","Home"))
)
)

Sets the Action, Controller, and routeValues for directory create operation.

C#
public EditorImageBrowserSettingsBuilder Create(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Create("CreateDirectory","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for directory create operation.

C#
public EditorImageBrowserSettingsBuilder Create(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Create("CreateDirectory","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller that will handle the directory creation.

C#
public EditorImageBrowserSettingsBuilder Create(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Create("CreateDirectory","Home")
)
)

Configures the URL for the image or directory destroy operation.

C#
public EditorImageBrowserSettingsBuilder Destroy(Action<EditorImageBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorImageBrowserOperationBuilder>

The action which configures the Destroy Action.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Destroy(destroy =&gt; destroy.Action("Delete","Home"))
)
)

Sets the Action, Controller, and routeValues for image or directory destroy operation.

C#
public EditorImageBrowserSettingsBuilder Destroy(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Destroy("Destroy","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for image or directory destroy operation.

C#
public EditorImageBrowserSettingsBuilder Destroy(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Destroy("Destroy","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller that will handle the image or directory deletion.

C#
public EditorImageBrowserSettingsBuilder Destroy(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Destroy("Delete","Home")
)
)

Defines the allowed file extensions. Default: ".png, .gif, .jpg, .jpeg"

C#
public EditorImageBrowserSettingsBuilder FileTypes(string value)
Parameters:valuestring

The file types.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.FileTypes("*.gif")
)
)

Configures the URL for serving the original image.

C#
public EditorImageBrowserSettingsBuilder Image(Action<EditorImageBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorImageBrowserOperationBuilder>

The action which configures the Image Action.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Image(image =&gt; image.Action("Image","Home"))
)
)

Sets the Action, Controller, and routeValues responsible for serving the original image.

C#
public EditorImageBrowserSettingsBuilder Image(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Image("Image","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues responsible for serving the original image.

C#
public EditorImageBrowserSettingsBuilder Image(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Image("Image","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller responsible for serving the original image.

C#
public EditorImageBrowserSettingsBuilder Image(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Image("Image","Home")
)
)

Sets the URL responsible for serving the original image. A image name placeholder should be specified. By default the placeholder value is URL encoded. If this is not desired, use a function.

C#
public EditorImageBrowserSettingsBuilder Image(string url)
Parameters:urlstring

The string URL.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Image("~/shared/UserFiles/Images/{0}")
)
)

Configures the URL for remote image read operation.

C#
public EditorImageBrowserSettingsBuilder Read(Action<EditorImageBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorImageBrowserOperationBuilder>

The action which configures the Read Action.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Read(read =&gt; read.Action("ReadImages","Home"))
)
)

Sets the Action, Controller, and routeValues for remote image retrieval.

C#
public EditorImageBrowserSettingsBuilder Read(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Read("ReadImages","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for remote image retrieval.

C#
public EditorImageBrowserSettingsBuilder Read(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Read("ReadImages","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller for remote image retrieval.

C#
public EditorImageBrowserSettingsBuilder Read(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Read("ReadImages","Home")
)
)

Configures the URL for retrieving the thumbnail version of the image.

C#
public EditorImageBrowserSettingsBuilder Thumbnail(Action<EditorImageBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorImageBrowserOperationBuilder>

The action which configures the Thumbnail Action.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Thumbnail(thumbnail =&gt; thumbnail.Action("GetThumbnails","Home"))
)
)

Sets the Action, Controller, and routeValues for retrieving the thumbnail version of the image.

C#
public EditorImageBrowserSettingsBuilder Thumbnail(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Thumbnail("GetThumbnails","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for retrieving the thumbnail version of the image.

C#
public EditorImageBrowserSettingsBuilder Thumbnail(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Thumbnail("GetThumbnails","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller for retrieving the thumbnail version of the image. If not specified a default image icon will be shown.

C#
public EditorImageBrowserSettingsBuilder Thumbnail(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Thumbnail("GetThumbnails","Home")
)
)

Configures the URL for images uplaod operation.

C#
public EditorImageBrowserSettingsBuilder Upload(Action<EditorImageBrowserOperationBuilder> configurator)
Parameters:configuratorAction<EditorImageBrowserOperationBuilder>

The action which configures the Upload Action.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Upload(upload =&gt; upload.Action("UploadImages","Home"))
)
)

Sets the Action, Controller, and routeValues for uploading new images.

C#
public EditorImageBrowserSettingsBuilder Upload(string actionName, string controllerName, object routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesobject

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Upload("UploadImages","Home", new { id = ViewData["id"] })
)
)

Sets the Action, Controller, and routeValues for uploading new images.

C#
public EditorImageBrowserSettingsBuilder Upload(string actionName, string controllerName, RouteValueDictionary routeValues)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

routeValuesRouteValueDictionary

Route values.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Upload("UploadImages","Home", new RouteValueDictionary { { "paramName[0]", "paramValue" } })
)
)

Sets the Action and Controller that will handle the new images upload. If not specified the Upload button will not be displayed.

C#
public EditorImageBrowserSettingsBuilder Upload(string actionName, string controllerName)
Parameters:actionNamestring

Name of the Action.

controllerNamestring

Name of the Controller.

Returns:

EditorImageBrowserSettingsBuilder

Example:
C#
@( Html.Kendo().Editor()
.Name("Editor")
.ImageBrowser(imageBrowser =&gt; imageBrowser
.Upload("UploadImages","Home")
)
)