New to Telerik UI for Blazor? Download Free 30-day trial

ImageEditor - Events

  • Example
    View Source
Edit the image and download it to fire the corresponding ImageEditor events.
Ready to create?
Upload a JPEG, PNG, or WebP image to unlock the full capabilities of ImageEditor.
Event Log
No events yet
Interact with the component to see events appear here.
Loading the demo source code...please wait.

Description

The Telerik UI for Blazor ImageEditor provides an in-browser workspace for opening and editing images. Its events let an application respond to key points in that workflow without coupling application logic to the editor's visual controls. This demo displays the latest event data directly beside the editor.

The OnOpen event fires before an image is opened and reports its file name, extension, size, and pixel dimensions. The callback can also set IsCancelled to prevent an image from opening, which is useful when an application needs to enforce image policies or request confirmation. The OnExecute event reports edits applied by the user or application, along with whether an edit was executed, undone, or redone. It provides one place to track changes made through tools such as crop, rotate, filters, shapes, text, and blur.

The OnExport event runs before the edited image is downloaded. It exposes the file name and output format, and supports cancelling the export. This can support workflows that apply naming rules, require approval, or coordinate an application-specific save process. The OnError event reports failures that occur while loading, editing, rendering, or exporting an image, allowing an application to present contextual feedback or log diagnostic information.

The event handlers in this example update a separate status line for each callback, making it possible to observe event payloads while interacting with the editor. Open an image, perform an edit, undo or redo it, and export the result to exercise the callbacks. Error events occur only when an operation fails. Values are rendered as ordinary Blazor text so file names and error messages remain encoded.

Attach handlers through the corresponding OnOpen, OnExecute, OnExport, and OnError parameters. For additional details about callback arguments and cancellation, see the ImageEditor events documentation.

This Blazor ImageEditor Events example is part of a unique collection of hundreds of Blazor demos, with which you can see all Telerik UI for Blazor components and their features in action. View the source code of the demos from the library or directly adapt, and edit them and their theme appearance in Telerik REPL for Blazor or ThemeBuilder.

Support & Learning Resources

An error has occurred. This application may no longer respond until reloaded.