Introducing AI Conversations: Natural Language Interaction for Your Apps! Learn More
ImageEditor | Properties & Commands
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
Source | ImageSource? | null | Image to edit (supports file, stream, URI) |
CurrentToolMode | ImageEditorToolMode | Move | Active tool: Move, Crop, Draw, Text, Line, Arrow (TwoWay) |
AllowCrop | bool | true | Enable/disable crop tool |
AllowRotate | bool | true | Enable/disable rotate action |
AllowDraw | bool | true | Enable/disable freehand drawing |
AllowTextAnnotation | bool | true | Enable/disable text annotations |
AllowLine | bool | true | Enable/disable line drawing tool |
AllowFontSelection | bool | false | Show font picker button in text mode toolbar |
AllowFontSizeSelection | bool | false | Show font size picker button in text mode toolbar |
AllowZoom | bool | true | Enable/disable pinch-to-zoom |
CanUndo | bool | false | Whether undo is available (OneWayToSource) |
CanRedo | bool | false | Whether redo is available (OneWayToSource) |
DrawStrokeColor | Color | White | Drawing stroke color (TwoWay) |
DrawStrokeWidth | double | 3 | Drawing stroke width |
TextFontSize | double | 16 | Text annotation font size |
TextFontFamily | string? | null | Font family for text annotations (TwoWay) |
AnnotationTextColor | Color | White | Text annotation color |
AvailableFonts | IList<string>? | null | Font families shown in the font picker |
AvailableFontSizes | IList<double>? | null | Font sizes shown in the font size picker |
SaveCommand | ICommand? | null | Invoked with EditedImage parameter on save |
SaveText | string | "Save" | Save button label |
CropApplyText | string | "Apply Crop" | Crop apply button label |
CropCancelText | string | "Cancel" | Crop cancel button label |
ToolbarTemplate | DataTemplate? | null | Custom toolbar (replaces the default toolbar) |
ToolbarPosition | ToolbarPosition | Bottom | Toolbar placement: Top or Bottom |
UseFeedback | bool | true | Feedback on actions (MAUI only) |
Commands
Section titled “Commands”All editing actions are exposed as ICommand properties for use with custom toolbars or ViewModels:
| Command | Parameter | Description |
|---|---|---|
UndoCommand | — | Undo the last edit action |
RedoCommand | — | Redo the last undone action |
RotateCommand | float (degrees) | Rotate the image |
ResetCommand | — | Clear all edits and restore the original image |
CropCommand | — | Toggle crop mode on/off |
DrawCommand | — | Toggle draw mode on/off |
TextCommand | — | Toggle text annotation mode on/off |
LineCommand | — | Toggle line drawing mode on/off |
SaveCommand | EditedImage | Fires when the user taps Save (only shown when bound) |
Methods
Section titled “Methods”| Method | Returns | Description |
|---|---|---|
Undo() | void | Undo the last action |
Redo() | void | Redo the last undone action |
Rotate(float degrees) | void | Rotate by the given angle |
Reset() | void | Clear all edits |
ApplyCrop() | void | Commit the active crop selection |
GetEditedImage() | EditedImage? | Get an EditedImage for export |