New to Telerik UI for WPFStart a free 30-day trial

Definition

Namespace:Telerik.Windows.Media.Imaging.Tools

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

C#
public class CropTool : ToolBase, ITool

Inheritance: objectToolBaseCropTool

Implements: ITool

Inherited Members ToolBase.IsResetSettingsSupported

Constructors

C#
public CropTool()

Properties

Gets whether the tool is changing the image size.

C#
public override bool AffectsLayout { get; }
Property Value:

Indicates whether a tool affects layout.

Overrides: ToolBase.AffectsLayout

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

C#
public double? AspectRatio { get; set; }
Property Value:

The aspect ratio.

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.

C#
public Size? FixedSize { get; set; }
Property Value:

The size of the crop rectangle.

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.

C#
public Size? InitialSize { get; set; }
Property Value:

The initial size.

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

C#
public override bool IsDirty { get; }
Property Value:

Indicates is there any changes.

Overrides: ToolBase.IsDirty

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

C#
public override bool IsPreviewOverlay { get; }
Property Value:

Indicates if a tool has a preview overlay.

Overrides: ToolBase.IsPreviewOverlay

Methods

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

C#
public override void AttachUI(ToolInitInfo previewInitInfo)
Parameters:previewInitInfoToolInitInfo

The preview init info.

Overrides: ToolBase.AttachUI(ToolInitInfo)

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

C#
public override void DetachUI()

Overrides: ToolBase.DetachUI()

Gets the tool's associated command.

C#
public override IImageCommand GetCommand()
Returns:

IImageCommand

The command.

Overrides: ToolBase.GetCommand()

Gets the tool's command context.

C#
public override object GetContext()
Returns:

object

The command context.

Overrides: ToolBase.GetContext()

Gets the tool' settings UI.

C#
public override UIElement GetSettingsUI()
Returns:

UIElement

The UI settings.

Overrides: ToolBase.GetSettingsUI()

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

C#
public override void ResetSettings()

Overrides: ToolBase.ResetSettings()