Shiny Controls v1.0 - The Ultra Control Suite for .NET MAUI & BlazorO...M...G!
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, Rectangle, Ellipse, Circle (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 |
AllowRectangle |
bool |
true |
Enable/disable the rectangle shape tool |
AllowEllipse |
bool |
true |
Enable/disable the ellipse shape tool |
AllowCircle |
bool |
true |
Enable/disable the circle shape tool |
ShapeFillColor |
Color? |
null |
Shape interior; null draws the outline only. Alpha honoured (TwoWay). See Shapes |
ShowShapeFillPicker |
bool |
true |
Show the fill swatch and fill on/off toggle while a shape tool is active |
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 zoom & pan |
ZoomLevel |
double |
1 |
Current zoom factor; 1.0 is fit-to-view (TwoWay) |
MinZoom |
double |
1 |
Lower zoom bound |
MaxZoom |
double |
8 |
Upper zoom bound |
ShowZoomControls |
bool |
true |
Show the zoom out / % / zoom in / fit cluster in the toolbar |
ShowToolLabels |
bool |
true |
Show captions under the tool icons |
ShowStrokeWidthPicker |
bool |
true |
Show pen-weight presets beside the colour swatch |
StrokeWidthPresets |
IList<double> |
2, 4, 8 |
Weights offered by the stroke-width picker |
ToolbarBackgroundColor |
Color |
dark scrim | Background of the default toolbar |
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 (TwoWay — the toolbar weight picker writes back to it) |
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 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 |
RectangleCommand |
– | Toggle the rectangle tool on/off |
EllipseCommand |
– | Toggle the ellipse tool on/off |
CircleCommand |
– | Toggle the circle tool on/off |
SaveCommand |
EditedImage |
Fires when the user taps Save (only shown when bound) |
ZoomInCommand |
– | Zoom in one step about the centre of the view |
ZoomOutCommand |
– | Zoom out one step about the centre of the view |
ZoomToFitCommand |
– | Return to fit-to-view |
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 |
ZoomIn() |
void |
Zoom in one step about the centre of the view |
ZoomOut() |
void |
Zoom out one step about the centre of the view |
ZoomToFit() |
void |
Return to fit-to-view |
Events
Section titled “Events”| Event | Payload | Description |
|---|---|---|
ZoomChanged |
double |
The zoom factor changed, from a gesture or from code |
Blazor equivalents
Section titled “Blazor equivalents”Blazor exposes the same surface as parameters and @ref methods:
| Member | Description |
|---|---|
MinZoom / MaxZoom / ShowZoomControls / ShowToolLabels / ShowStrokeWidthPicker / StrokeWidthPresets |
Parameters, same defaults as MAUI |
ZoomLevel |
Read-only property holding the current factor |
ZoomLevelChanged |
EventCallback<double> raised for gestures and code alike |
ZoomInAsync() / ZoomOutAsync() / ZoomToFitAsync() / SetZoomAsync(double) |
Zoom from code |
AllowRectangle / AllowEllipse / AllowCircle / ShowShapeFillPicker |
Parameters, same defaults as MAUI |
ShapeFillColor |
A #rrggbb string rather than a Color; null or empty leaves shapes unfilled |
ShapeFillOpacity |
double (0-1, default 0.35) – Blazor only, because <input type="color"> cannot carry alpha; MAUI keeps it in the Color |
SetModeAsync("rect" | "ellipse" | "circle") |
Selects a shape tool from code |
ToolbarActions |
RenderFragment rendered at the trailing edge of the default toolbar |
CropApplyText / CropCancelText |
Crop bar labels |


