Class
RadImageEditor

RadImageEditor is powerful UI component for image editing.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

cs-api-definition
[TelerikToolboxCategory("Input")]
public class RadImageEditor : Control

Inheritance: objectRadImageEditor

Constructors

RadImageEditor()

Declaration

cs-api-definition
public RadImageEditor()

Fields

AllowMouseWheelScalingProperty

Declaration

cs-api-definition
public static readonly DependencyProperty AllowMouseWheelScalingProperty

Field Value

DependencyProperty

ImageProperty

Declaration

cs-api-definition
public static readonly DependencyProperty ImageProperty

Field Value

DependencyProperty

ImageViewName

Declaration

cs-api-definition
public const string ImageViewName = "ImageView"

Field Value

string

IsPanningEnabledProperty

Declaration

cs-api-definition
public static readonly DependencyProperty IsPanningEnabledProperty

Field Value

DependencyProperty

IsReadOnlyProperty

Declaration

cs-api-definition
public static readonly DependencyProperty IsReadOnlyProperty

Field Value

DependencyProperty

MainImageName

Declaration

cs-api-definition
public const string MainImageName = "MainImage"

Field Value

string

MaximumMouseWheelScaleFactor

Declaration

cs-api-definition
public static readonly double MaximumMouseWheelScaleFactor

Field Value

double

MinimumMouseWheelScaleFactor

Declaration

cs-api-definition
public static readonly double MinimumMouseWheelScaleFactor

Field Value

double

PreviewPanelName

Declaration

cs-api-definition
public const string PreviewPanelName = "PreviewPanel"

Field Value

string

ScaleFactorProperty

Declaration

cs-api-definition
public static readonly DependencyProperty ScaleFactorProperty

Field Value

DependencyProperty

ScrollContentName

Declaration

cs-api-definition
public const string ScrollContentName = "ScrollContent"

Field Value

string

ScrollViewerName

Declaration

cs-api-definition
public const string ScrollViewerName = "ScrollViewer"

Field Value

string

ToolSettingsContainerProperty

Declaration

cs-api-definition
public static readonly DependencyProperty ToolSettingsContainerProperty

Field Value

DependencyProperty

ToolSettingsPaneName

Declaration

cs-api-definition
public const string ToolSettingsPaneName = "ToolSettingsPane"

Field Value

string

ZoomToCursorProperty

Declaration

cs-api-definition
public static readonly DependencyProperty ZoomToCursorProperty

Field Value

DependencyProperty

Properties

ActualScaleFactor

Gets the actual scale factor.

Declaration

cs-api-definition
public double ActualScaleFactor { get; }

Property Value

double

The actual scale factor.

AllowMouseWheelScaling

Gets or sets the value indicating whether wheel scaling is allowed.

Declaration

cs-api-definition
public bool AllowMouseWheelScaling { get; set; }

Property Value

bool

Allow mouse wheel scaling.

Commands

Gets the image editor commands.

Declaration

cs-api-definition
public ImageEditorCommands Commands { get; }

Property Value

ImageEditorCommands

The commands.

ExecutingTool

Gets the tool that is currently executing.

Declaration

cs-api-definition
public ITool ExecutingTool { get; }

Property Value

ITool

The tool.

HasImage

Gets a value indicating whether there is image loaded in the image editor.

Declaration

cs-api-definition
public bool HasImage { get; }

Property Value

bool

True if there is image loaded in the image editor.

History

Gets the history.

Declaration

cs-api-definition
public ImageHistory History { get; }

Property Value

ImageHistory

The history.

Image

Gets or sets the current image.

Declaration

cs-api-definition
public RadBitmap Image { get; set; }

Property Value

RadBitmap

The image.

ImageViewSize

Gets the scaled size of the image.

Declaration

cs-api-definition
public Size ImageViewSize { get; }

Property Value

Size

The scaled size of the image.

IsPanningEnabled

Gets or sets a value indicating whether the panning functionality is enabled.

Declaration

cs-api-definition
public bool IsPanningEnabled { get; set; }

Property Value

bool

Boolean value indicating whether the panning functionality is enabled.

IsReadOnly

Gets or sets a value indicating whether the control is read-only.

Declaration

cs-api-definition
public bool IsReadOnly { get; set; }

Property Value

bool

ScaleFactor

Gets or sets the scale factor. If 0 is set the scale factor is AutoFit.

Declaration

cs-api-definition
public double ScaleFactor { get; set; }

Property Value

double

The scale factor.

ToolSettingsContainer

Gets or sets the tool settings container.

Declaration

cs-api-definition
public IToolSettingsContainer ToolSettingsContainer { get; set; }

Property Value

IToolSettingsContainer

The tool settings container.

ZoomToCursor

Gets or sets the value indicating whether wheel scaling is performed towards the mouse cursor on the image.

Declaration

cs-api-definition
public bool ZoomToCursor { get; set; }

Property Value

bool

Methods

AutoScaleImage()

Causes this RadImageEditor instance to go into AutoFit mode by settings the ScaleFactor property to 0.

Declaration

cs-api-definition
public void AutoScaleImage()

CancelExecuteTool()

Cancels currently executing tool.

Declaration

cs-api-definition
public void CancelExecuteTool()

CommitTool()

Commits the currently executing tool.

Declaration

cs-api-definition
public void CommitTool()

CommitTool(bool)

Commits the currently executing tool.

Declaration

cs-api-definition
public void CommitTool(bool executeSameToolAfterCommit)

Parameters

executeSameToolAfterCommit

bool

Execute same tool after commit.

ExecuteCommand(IImageCommand, object)

Executes command.

Declaration

cs-api-definition
public void ExecuteCommand(IImageCommand command, object context)

Parameters

command

IImageCommand

The command.

context

object

The context.

ExecuteTool(ITool)

Executes tool.

Declaration

cs-api-definition
public void ExecuteTool(ITool tool)

Parameters

tool

ITool

The tool.

Flip(Orientation)

Flips the loaded image.

Declaration

cs-api-definition
public void Flip(Orientation flipOrientation)

Parameters

flipOrientation

Orientation

The flip orientation.

InvertColors()

Inverts the colors of the image.

Declaration

cs-api-definition
public void InvertColors()

OnApplyTemplate()

Declaration

cs-api-definition
public override void OnApplyTemplate()

OnCommandError(CommandErrorEventArgs)

Declaration

cs-api-definition
protected virtual void OnCommandError(CommandErrorEventArgs args)

Parameters

args

CommandErrorEventArgs

OnCommandExecuted(ImageCommandExecutedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnCommandExecuted(ImageCommandExecutedEventArgs e)

Parameters

e

ImageCommandExecutedEventArgs

The ImageCommandExecutedEventArgs instance containing the event data.

OnCommandExecuting(ImageCommandExecutingEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnCommandExecuting(ImageCommandExecutingEventArgs e)

Parameters

e

ImageCommandExecutingEventArgs

The ImageCommandExecutingEventArgs instance containing the event data.

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnImageViewSizeChanged()

Declaration

cs-api-definition
protected virtual void OnImageViewSizeChanged()

OnInitialized(EventArgs)

Raises the event. This method is invoked whenever is set to true internally.

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnIsReadOnlyChanged(EventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnIsReadOnlyChanged(EventArgs e)

Parameters

e

EventArgs

The EventArgs instance containing the event data.

OnScaleFactorChanged()

Declaration

cs-api-definition
protected virtual void OnScaleFactorChanged()

OnToolCommitted(ToolCommittedEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnToolCommitted(ToolCommittedEventArgs e)

Parameters

e

ToolCommittedEventArgs

The ToolCommittedEventArgs instance containing the event data.

OnToolCommitting(ToolCommittingEventArgs)

Raises the event.

Declaration

cs-api-definition
protected virtual void OnToolCommitting(ToolCommittingEventArgs e)

Parameters

e

ToolCommittingEventArgs

The ToolCommittingEventArgs instance containing the event data.

Redo()

Executes redo.

Declaration

cs-api-definition
public bool Redo()

Returns

bool

ResetToolSettings()

Resets the currently executing tool settings.

Declaration

cs-api-definition
public void ResetToolSettings()

Rotate(double)

Rotates the image.

Declaration

cs-api-definition
public void Rotate(double degrees)

Parameters

degrees

double

The degrees.

Rotate(double, Color)

Rotates the image.

Declaration

cs-api-definition
public void Rotate(double degrees, Color backgroundColor)

Parameters

degrees

double

The degrees.

backgroundColor

Color

Color of the background.

Undo()

Executes Undo.

Declaration

cs-api-definition
public bool Undo()

Returns

bool

Events

CommandError

Occurs on error while executing command.

Declaration

cs-api-definition
public event EventHandler<CommandErrorEventArgs> CommandError

Event Value

EventHandler<CommandErrorEventArgs>

CommandExecuted

Occurs after the execution of ImageEditorCommandBase.

Declaration

cs-api-definition
public event EventHandler<ImageCommandExecutedEventArgs> CommandExecuted

Event Value

EventHandler<ImageCommandExecutedEventArgs>

CommandExecuting

Occurs before the execution of ImageEditorCommandBase.

Declaration

cs-api-definition
public event EventHandler<ImageCommandExecutingEventArgs> CommandExecuting

Event Value

EventHandler<ImageCommandExecutingEventArgs>

ImageViewSizeChanged

Occurs when the image view size is changed.

Declaration

cs-api-definition
public event EventHandler ImageViewSizeChanged

Event Value

EventHandler

IsReadOnlyChanged

Occurs when the IsReadOnly property changes.

Declaration

cs-api-definition
public event EventHandler IsReadOnlyChanged

Event Value

EventHandler

ScaleFactorChanged

Occurs when scale factor is changed.

Declaration

cs-api-definition
public event EventHandler ScaleFactorChanged

Event Value

EventHandler

ToolCommitted

Occurs when the tool is committed.

Declaration

cs-api-definition
public event EventHandler<ToolCommittedEventArgs> ToolCommitted

Event Value

EventHandler<ToolCommittedEventArgs>

ToolCommitting

Occurs before the tool is about to commit.

Declaration

cs-api-definition
public event EventHandler<ToolCommittingEventArgs> ToolCommitting

Event Value

EventHandler<ToolCommittingEventArgs>