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 SelectionTool : DrawTool, ITool

Inheritance: objectToolBaseDrawToolBaseDrawToolSelectionTool

Implements: ITool

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

Constructors

Initializes a new instance of the SelectionTool class.

C#
public SelectionTool()

Properties

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

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

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

Indicates whether the settings can be reseted.

Overrides: DrawToolBase.IsResetSettingsSupported

Gets or sets the shapes.

C#
public ObservableCollection<IShape> SelectionShapes { get; }
Property Value:

The shapes.

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: DrawToolBase.AttachUI(ToolInitInfo)

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

C#
public override void DetachUI()

Overrides: DrawToolBase.DetachUI()

Draws a geometry.

C#
protected override void Draw(Point currentPoint)
Parameters:currentPointPoint

The current point related to the image.

Overrides: DrawTool.Draw(Point)

Ends the drawing of a geometry.

C#
protected override void EndDraw(Point currentPoint)
Parameters:currentPointPoint

The current point related to the image.

Overrides: DrawTool.EndDraw(Point)

Gets the tool's associated command.

C#
public override IImageCommand GetCommand()
Returns:

IImageCommand

The command.

Overrides: DrawToolBase.GetCommand()

Gets the tool's command context.

C#
public override object GetContext()
Returns:

object

The command context.

Overrides: DrawToolBase.GetContext()

Gets the tool' settings UI.

C#
public override UIElement GetSettingsUI()
Returns:

UIElement

The UI settings.

Overrides: DrawTool.GetSettingsUI()

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

C#
public override void ResetSettings()

Overrides: DrawTool.ResetSettings()

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

C#
protected override void SetPathProperties(Path path)
Parameters:pathPath

The path.

Overrides: DrawTool.SetPathProperties(Path)

Starts the drawing of the selection geometry.

C#
protected override void StartDraw(Point currentPoint)
Parameters:currentPointPoint

The current point related to the image.

Overrides: DrawTool.StartDraw(Point)