TelerikImageEditor
Telerik Image Editor component for viewing and editing raster images in Blazor applications. Provides a toolbar, a tool sidebar, contextual tool panes, and an editing canvas.
Definition
Namespace:Telerik.Blazor.Components
Assembly:Telerik.Blazor.dll
Syntax:
public class TelerikImageEditor : BaseComponent, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance: objectComponentBaseBaseComponentTelerikImageEditor
Implements:
Inherited Members
Constructors
public TelerikImageEditor()
Properties
Controls whether the component renders its adaptive (mobile) layout. When set to Auto, the canvas renders first and the tool pane and sidebar are docked at the bottom.
[Parameter]
public AdaptiveMode AdaptiveMode { get; set; }
The image to load as a byte array. Set a new array instance to load another image. Set null or an empty array to clear the editor.
[Parameter]
public byte[] Data { get; set; }
[CascadingParameter]
public DialogFactory DialogFactory { get; set; }
Controls the height of the editing area (canvas, sidebar and tool pane) using any valid CSS unit like "600px".
[Parameter]
public string Height { get; set; }
Defines a render fragment that contains the settings of the Image Editor. Children: ImageEditorFileSelectSettings.
[Parameter]
public RenderFragment ImageEditorSettings { get; set; }
Fires when loading, editing, rendering, or exporting an image fails.
[Parameter]
public EventCallback<ImageEditorErrorEventArgs> OnError { get; set; }
Fires after the ImageEditor applies, undoes, or redoes an edit from any tool, such as crop, rotate, filter, text, shapes, or blur. Use it to track or log user actions from one place. Zoom, pan, and live previews do not fire the event.
[Parameter]
public EventCallback<ImageEditorExecuteEventArgs> OnExecute { get; set; }
Fires before downloading the edited image. Set IsCancelled to prevent the download.
[Parameter]
public EventCallback<ImageEditorExportEventArgs> OnExport { get; set; }
Methods
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Overrides:
public override void Dispose()
Overrides:
Runs an editor command from code, for example ExecuteAsync(ImageEditorCommand.Rotate, new ImageEditorAngleArgs { Angle = 90 }). Uses the same commands and argument classes that the OnExecute event reports. The edit is added to the undo history.
public Task ExecuteAsync(ImageEditorCommand command, ImageEditorCommandArgs args)
The command to run.
argsImageEditorCommandArgsThe command arguments. Use the class that the command value documents. Pass null for commands without arguments.
The arguments do not match the command.
Runs an editor command that has no arguments, for example ResetCrop. The edit is added to the undo history.
public Task ExecuteAsync(ImageEditorCommand command)
The command to run.
Returns:Gets the edited image as a byte array, including all edits such as crop, filters, text, and shapes. The image uses the current export format.
protected override void OnParametersSet()
Overrides: