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

Defines the fluent API for configuring the Kendo UI ImageEditor for ASP.NET MVC events.

Definition

Constructors

Initializes a new instance of the ImageEditorEventBuilder class.

C#
public ImageEditorEventBuilder(IDictionary<string, object> events)
Parameters:eventsIDictionary<string, object>

The ImageEditor event handlers.

Methods

Defines the handler of the Error client-side event. Fired when an error happened with the image loading.

C#
public ImageEditorEventBuilder Error(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events.Error(
@&lt;text&gt;
function(event){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Error client-side event. Fired when an error happened with the image loading.

C#
public ImageEditorEventBuilder Error(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Error event.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events
.Error("onError")
)
)

Defines the handler of the Execute client-side event. Fired when a command is executed.

C#
public ImageEditorEventBuilder Execute(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events.Execute(
@&lt;text&gt;
function(event){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the Execute client-side event. Fired when a command is executed.

C#
public ImageEditorEventBuilder Execute(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the Execute event.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events
.Execute("onExecute")
)
)

Defines the handler of the ImageLoaded client-side event. Fired when image is loaded. Can prevent the image rendering by calling the preventDefault() method.

C#
public ImageEditorEventBuilder ImageLoaded(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events.ImageLoaded(
@&lt;text&gt;
function(event){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the ImageLoaded client-side event. Fired when image is loaded. Can prevent the image rendering by calling the preventDefault() method.

C#
public ImageEditorEventBuilder ImageLoaded(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ImageLoaded event.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events
.ImageLoaded("onImageLoaded")
)
)

Defines the handler of the ImageRendered client-side event. Fired when canvas is rendered with the image. This event is triggered by commands and when drawCanvas method is called.

C#
public ImageEditorEventBuilder ImageRendered(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events.ImageRendered(
@&lt;text&gt;
function(event){
event handling code
}
&lt;/text&gt;
))
)

Defines the handler of the ImageRendered client-side event. Fired when canvas is rendered with the image. This event is triggered by commands and when drawCanvas method is called.

C#
public ImageEditorEventBuilder ImageRendered(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the ImageRendered event.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Example:
C#
@(Html.Kendo().ImageEditor()
.Name("imageEditor")
.Events(events =&gt; events
.ImageRendered("onImageRendered")
)
)

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the ImageEditor is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ImageEditorEventBuilder KendoKeydown(Func<object, object> handler)
Parameters:handlerFunc<object, object>

The handler code wrapped in a text tag.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .

Defines the handler of the KendoKeydown client-side event. Triggered when the user presses a keyboard key while the ImageEditor is focused.The event handler function context (available via the this keyword) will be set to the widget instance.

C#
public ImageEditorEventBuilder KendoKeydown(string handler)
Parameters:handlerstring

The name of the JavaScript function that will handle the KendoKeydown event.

Returns:

ImageEditorEventBuilder

Returns the current instance of ImageEditorEventBuilder .