New to Telerik UI for Blazor? Download Free 30-day trial
ImageEditor - Events
- ExampleView Source
-
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.