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

RadImageEditor is powerful UI component for image editing.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.ImageEditor.dll

Syntax:

C#
[TelerikToolboxCategory("Input")]
public class RadImageEditor : Control

Inheritance: objectRadImageEditor

Constructors

C#
public RadImageEditor()

Fields

C#
public static readonly DependencyProperty AllowMouseWheelScalingProperty

ImageProperty

DependencyProperty

C#
public static readonly DependencyProperty ImageProperty
C#
public const string ImageViewName = "ImageView"

IsPanningEnabledProperty

DependencyProperty

C#
public static readonly DependencyProperty IsPanningEnabledProperty

IsReadOnlyProperty

DependencyProperty

C#
public static readonly DependencyProperty IsReadOnlyProperty
C#
public const string MainImageName = "MainImage"
C#
public static readonly double MaximumMouseWheelScaleFactor
C#
public static readonly double MinimumMouseWheelScaleFactor
C#
public const string PreviewPanelName = "PreviewPanel"

ScaleFactorProperty

DependencyProperty

C#
public static readonly DependencyProperty ScaleFactorProperty
C#
public const string ScrollContentName = "ScrollContent"
C#
public const string ScrollViewerName = "ScrollViewer"
C#
public static readonly DependencyProperty ToolSettingsContainerProperty
C#
public const string ToolSettingsPaneName = "ToolSettingsPane"

ZoomToCursorProperty

DependencyProperty

C#
public static readonly DependencyProperty ZoomToCursorProperty

Properties

Gets the actual scale factor.

C#
public double ActualScaleFactor { get; }
Property Value:

The actual scale factor.

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

C#
public bool AllowMouseWheelScaling { get; set; }
Property Value:

Allow mouse wheel scaling.

Gets the image editor commands.

C#
public ImageEditorCommands Commands { get; }
Property Value:

The commands.

Gets the tool that is currently executing.

C#
public ITool ExecutingTool { get; }
Property Value:

The tool.

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

C#
public bool HasImage { get; }
Property Value:

True if there is image loaded in the image editor.

Gets the history.

C#
public ImageHistory History { get; }
Property Value:

The history.

Gets or sets the current image.

C#
public RadBitmap Image { get; set; }
Property Value:

The image.

Gets the scaled size of the image.

C#
public Size ImageViewSize { get; }
Property Value:

The scaled size of the image.

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

C#
public bool IsPanningEnabled { get; set; }
Property Value:

Boolean value indicating whether the panning functionality is enabled.

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

C#
public bool IsReadOnly { get; set; }

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

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

The scale factor.

Gets or sets the tool settings container.

C#
public IToolSettingsContainer ToolSettingsContainer { get; set; }
Property Value:

The tool settings container.

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

C#
public bool ZoomToCursor { get; set; }

Methods

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

C#
public void AutoScaleImage()

Cancels currently executing tool.

C#
public void CancelExecuteTool()

Commits the currently executing tool.

C#
public void CommitTool()

Commits the currently executing tool.

C#
public void CommitTool(bool executeSameToolAfterCommit)
Parameters:executeSameToolAfterCommitbool

Execute same tool after commit.

Executes command.

C#
public void ExecuteCommand(IImageCommand command, object context)
Parameters:commandIImageCommand

The command.

contextobject

The context.

Executes tool.

C#
public void ExecuteTool(ITool tool)
Parameters:toolITool

The tool.

Flips the loaded image.

C#
public void Flip(Orientation flipOrientation)
Parameters:flipOrientationOrientation

The flip orientation.

Inverts the colors of the image.

C#
public void InvertColors()
C#
public override void OnApplyTemplate()
C#
protected virtual void OnCommandError(CommandErrorEventArgs args)
Parameters:argsCommandErrorEventArgs

Raises the event.

C#
protected virtual void OnCommandExecuted(ImageCommandExecutedEventArgs e)
Parameters:eImageCommandExecutedEventArgs

The ImageCommandExecutedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnCommandExecuting(ImageCommandExecutingEventArgs e)
Parameters:eImageCommandExecutingEventArgs

The ImageCommandExecutingEventArgs instance containing the event data.

C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

C#
protected virtual void OnImageViewSizeChanged()

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

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Raises the event.

C#
protected virtual void OnIsReadOnlyChanged(EventArgs e)
Parameters:eEventArgs

The EventArgs instance containing the event data.

C#
protected virtual void OnScaleFactorChanged()

Raises the event.

C#
protected virtual void OnToolCommitted(ToolCommittedEventArgs e)
Parameters:eToolCommittedEventArgs

The ToolCommittedEventArgs instance containing the event data.

Raises the event.

C#
protected virtual void OnToolCommitting(ToolCommittingEventArgs e)
Parameters:eToolCommittingEventArgs

The ToolCommittingEventArgs instance containing the event data.

Executes redo.

C#
public bool Redo()
Returns:

bool

Resets the currently executing tool settings.

C#
public void ResetToolSettings()

Rotates the image.

C#
public void Rotate(double degrees, Color backgroundColor)
Parameters:degreesdouble

The degrees.

backgroundColorColor

Color of the background.

Rotates the image.

C#
public void Rotate(double degrees)
Parameters:degreesdouble

The degrees.

Executes Undo.

C#
public bool Undo()
Returns:

bool

Events

Occurs on error while executing command.

C#
public event EventHandler<CommandErrorEventArgs> CommandError

Occurs after the execution of ImageEditorCommandBase.

C#
public event EventHandler<ImageCommandExecutedEventArgs> CommandExecuted

Occurs before the execution of ImageEditorCommandBase.

C#
public event EventHandler<ImageCommandExecutingEventArgs> CommandExecuting

Occurs when the image view size is changed.

C#
public event EventHandler ImageViewSizeChanged

Occurs when the IsReadOnly property changes.

C#
public event EventHandler IsReadOnlyChanged

Occurs when scale factor is changed.

C#
public event EventHandler ScaleFactorChanged

Occurs when the tool is committed.

C#
public event EventHandler<ToolCommittedEventArgs> ToolCommitted

Occurs before the tool is about to commit.

C#
public event EventHandler<ToolCommittingEventArgs> ToolCommitting