Shiny .NET v4 is here with BLE Windows Support, Improved GPS, & More! Check It Out
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 (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 |
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 |
AnnotationTextColor | Color | White | Text annotation color |
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 |
UseHapticFeedback | bool | true | Haptic 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 |
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 |