Class
SelectionTool

Definition

Namespace:Telerik.Windows.Media.Imaging.Tools

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

cs-api-definition
public class SelectionTool : DrawTool, ITool

Inheritance: objectToolBaseDrawToolBaseDrawToolSelectionTool

Implements: ITool

Inherited Members DrawTool.CreatePathFigure(Point)DrawTool.CreatePathSegment(Point)DrawTool.DefaultBrushSizeDrawTool.DefaultBrushColorDrawToolBase.IsPreviewOverlayDrawToolBase.AffectsLayout

Constructors

SelectionTool()

Initializes a new instance of the SelectionTool class.

Declaration

cs-api-definition
public SelectionTool()

Properties

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 DrawTool.IsDirty

IsResetSettingsSupported

Specifies whether the settings of a tool can be reset. The common implementation of a tool returns true.

Declaration

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

Property Value

bool

Indicates whether the settings can be reseted.

Overrides DrawToolBase.IsResetSettingsSupported

SelectionShapes

Gets or sets the shapes.

Declaration

cs-api-definition
public ObservableCollection<IShape> SelectionShapes { get; }

Property Value

ObservableCollection<IShape>

The shapes.

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 DrawToolBase.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 DrawToolBase.DetachUI()

Draw(Point)

Draws a geometry.

Declaration

cs-api-definition
protected override void Draw(Point currentPoint)

Parameters

currentPoint

Point

The current point related to the image.

Overrides DrawTool.Draw(Point)

EndDraw(Point)

Ends the drawing of a geometry.

Declaration

cs-api-definition
protected override void EndDraw(Point currentPoint)

Parameters

currentPoint

Point

The current point related to the image.

Overrides DrawTool.EndDraw(Point)

GetCommand()

Gets the tool's associated command.

Declaration

cs-api-definition
public override IImageCommand GetCommand()

Returns

IImageCommand

The command.

Overrides DrawToolBase.GetCommand()

GetContext()

Gets the tool's command context.

Declaration

cs-api-definition
public override object GetContext()

Returns

object

The command context.

Overrides DrawToolBase.GetContext()

GetSettingsUI()

Gets the tool' settings UI.

Declaration

cs-api-definition
public override UIElement GetSettingsUI()

Returns

UIElement

The UI settings.

Overrides DrawTool.GetSettingsUI()

ResetSettings()

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

Declaration

cs-api-definition
public override void ResetSettings()

Overrides DrawTool.ResetSettings()

SetPathProperties(Path)

Sets properties to the path which contains the geometry which shall be drawn.

Declaration

cs-api-definition
protected override void SetPathProperties(Path path)

Parameters

path

Path

The path.

Overrides DrawTool.SetPathProperties(Path)

StartDraw(Point)

Starts the drawing of the selection geometry.

Declaration

cs-api-definition
protected override void StartDraw(Point currentPoint)

Parameters

currentPoint

Point

The current point related to the image.

Overrides DrawTool.StartDraw(Point)