Class
CropTool

Definition

Namespace:Telerik.Windows.Media.Imaging.Tools

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

cs-api-definition
public class CropTool : ToolBase, ITool

Inheritance: objectToolBaseCropTool

Implements: ITool

Inherited Members ToolBase.IsResetSettingsSupported

Constructors

CropTool()

Declaration

cs-api-definition
public CropTool()

Properties

AffectsLayout

Gets whether the tool is changing the image size.

Declaration

cs-api-definition
public override bool AffectsLayout { get; }

Property Value

bool

Indicates whether a tool affects layout.

Overrides ToolBase.AffectsLayout

AspectRatio

Gets or sets the aspect ratio of the crop rectangle. If FixedSize property is set, the value of AspectRatio property will be ignored.

Declaration

cs-api-definition
public double? AspectRatio { get; set; }

Property Value

double?

The aspect ratio.

FixedSize

Gets or sets the size of the crop rectangle. The rectangle cannot be resized. If this property is set, the values of AspectRatio and InitialSize properties will be ignored.

Declaration

cs-api-definition
public Size? FixedSize { get; set; }

Property Value

Size?

The size of the crop rectangle.

InitialSize

Gets or sets the initial size of the crop rectangle. If the AspectRatio property is set and the value of this property does not match the AspectRatio property's value, the value of InitialSize property will be ignored.

Declaration

cs-api-definition
public Size? InitialSize { get; set; }

Property Value

Size?

The initial size.

IsDirty

Gets whether the tool has made any changes on the image.

Declaration

cs-api-definition
public override bool IsDirty { get; }

Property Value

bool

Indicates is there any changes.

Overrides ToolBase.IsDirty

IsPreviewOverlay

Gets whether the tool has a preview overlay on the main image.

Declaration

cs-api-definition
public override bool IsPreviewOverlay { get; }

Property Value

bool

Indicates if a tool has a preview overlay.

Overrides ToolBase.IsPreviewOverlay

Methods

AttachUI(ToolInitInfo)

Attaches the UI. The method is invoked on tool's execution.

Declaration

cs-api-definition
public override void AttachUI(ToolInitInfo previewInitInfo)

Parameters

previewInitInfo

ToolInitInfo

The preview init info.

Overrides ToolBase.AttachUI(ToolInitInfo)

DetachUI()

Detaches the UI. The method is invoked when the tool execution is canceled.

Declaration

cs-api-definition
public override void DetachUI()

Overrides ToolBase.DetachUI()

GetCommand()

Gets the tool's associated command.

Declaration

cs-api-definition
public override IImageCommand GetCommand()

Returns

IImageCommand

The command.

Overrides ToolBase.GetCommand()

GetContext()

Gets the tool's command context.

Declaration

cs-api-definition
public override object GetContext()

Returns

object

The command context.

Overrides ToolBase.GetContext()

GetSettingsUI()

Gets the tool' settings UI.

Declaration

cs-api-definition
public override UIElement GetSettingsUI()

Returns

UIElement

The UI settings.

Overrides ToolBase.GetSettingsUI()

ResetSettings()

Resets the tool' settings if the tool's IsResetSettingsSupported property is true.

Declaration

cs-api-definition
public override void ResetSettings()

Overrides ToolBase.ResetSettings()