Class PxlCropImageView
Interactive crop editor composed of an image layer, adjustable cutout overlay, and optional toolbar buttons.
Namespace: ImageSdkWrapper.Maui Assembly: ImageSdkWrapper.MAUI
Inheritance: object → BindableObject → Element → NavigableElement → VisualElement → View → Layout → Grid
public class PxlCropImageView : Grid
Constructor
PxlCropImageView()
Creates a new crop image editor with toolbar and overlay initialised.
public PxlCropImageView()
Event
ActveChanged
Raised when Active changes.
public event EventHandler ActveChanged
Returns
- EventHandler
OnMenu
Raised when the menu button is tapped.
public event EventHandler OnMenu
Returns
- EventHandler
Field
CornerActiveColor
Corner colour when the crop is active.
public Color CornerActiveColor
Returns
- Color
CornerInvalidColor
Corner colour when the crop is invalid.
public Color CornerInvalidColor
Returns
- Color
CornerMoveColor
Corner colour while dragging.
public Color CornerMoveColor
Returns
- Color
DbgZoom
Stores the last zoom value used when forecasting picture layout.
public double DbgZoom
Returns
- double
EdgeActiveColor
Colour applied to edges when the crop is active.
public Color EdgeActiveColor
Returns
- Color
EdgeInvalidColor
Colour applied when the crop selection is invalid.
public Color EdgeInvalidColor
Returns
- Color
EdgeMoveColor
Colour applied during edge drag operations.
public Color EdgeMoveColor
Returns
- Color
NonActiveEdgeColor
Colour applied to edges when the crop is inactive.
public Color NonActiveEdgeColor
Returns
- Color
TouchDeltaX
Latest X offset applied to the picture during layout forecasting.
public double TouchDeltaX
Returns
- double
TouchDeltaY
Latest Y offset applied to the picture during layout forecasting.
public double TouchDeltaY
Returns
- double
_ToolBarHeight
Backing field storing the toolbar height.
public double _ToolBarHeight
Returns
- double
Method
DbgPrintSizes()
Writes diagnostic information about layout sizes to the debug output.
public void DbgPrintSizes()
MyLoadImg(string)
Loads an embedded toolbar icon.
public static ImageSource MyLoadImg(string s)
Parameters
s(string): Resource name without extension.
Returns
- ImageSource: The requested image source.
OnParentSet()
Raises the (internal) ParentSet event.
protected override void OnParentSet()
TakeToolBar()
Detaches the toolbar layout from the control and returns it.
public Layout TakeToolBar()
Returns
- Layout: The toolbar layout instance.
UiSetMetaImage(MetaImage, bool, Corners, Corners)
Assigns a new meta image to the editor and updates the crop overlay.
public void UiSetMetaImage(MetaImage image, bool hideGreenRect, Corners corners, Corners detectedCorners)
Parameters
image(MetaImage): Meta image to display.hideGreenRect(bool): Whentrue, hides the crop overlay.corners(Corners): User-defined corners to seed the crop.detectedCorners(Corners): Automatically detected corners, if available.
Property
Active
Gets or sets whether the editor is currently active and responding to user interaction.
public bool Active { get; set; }
Returns
- bool
CloseButton
Gets or sets the close button instance.
public ImageButton CloseButton { get; set; }
Returns
- ImageButton
MenuButton
Gets or sets the menu button instance.
public ImageButton MenuButton { get; set; }
Returns
- ImageButton
RotateLeftButton
Gets or sets the rotate-left button instance.
public ImageButton RotateLeftButton { get; set; }
Returns
- ImageButton
RotateRightButton
Gets or sets the rotate-right button instance.
public ImageButton RotateRightButton { get; set; }
Returns
- ImageButton
SafeAreaPadding
Gets or sets safe-area padding applied to the toolbar.
public Thickness SafeAreaPadding { get; set; }
Returns
- Thickness
SelectButton
Gets or sets the select button instance.
public ImageButton SelectButton { get; set; }
Returns
- ImageButton
ToolBarBackgroundColor
Gets or sets the toolbar background colour.
public Color ToolBarBackgroundColor { get; set; }
Returns
- Color
ToolBarButtonsSpace
Gets or sets horizontal spacing between toolbar buttons.
public double ToolBarButtonsSpace { get; set; }
Returns
- double
ToolBarHeight
Gets or sets the toolbar height.
public double ToolBarHeight { get; set; }
Returns
- double
ToolBarPadding
Gets or sets padding applied to the toolbar.
public Thickness ToolBarPadding { get; set; }
Returns
- Thickness
TouchRadius
Touch radius used for hit-testing crop handles.
public double TouchRadius { get; set; }
Returns
- double
ZoomInMovingMode
Zoom factor applied when the user drags the crop.
public double ZoomInMovingMode { get; set; }
Returns
- double