Class RadImageEditor
RadImageEditor is powerful UI component for image editing.
Inheritance
Namespace: Telerik.Windows.Controls
Assembly: Telerik.Windows.Controls.ImageEditor.dll
Syntax
[TelerikToolboxCategory("Input")]
public class RadImageEditor : Control
Constructors
RadImageEditor()
Declaration
public RadImageEditor()
Fields
AllowMouseWheelScalingProperty
Declaration
public static readonly DependencyProperty AllowMouseWheelScalingProperty
Field Value
System.Windows.DependencyProperty
|
ImageProperty
Declaration
public static readonly DependencyProperty ImageProperty
Field Value
System.Windows.DependencyProperty
|
ImageViewName
Declaration
public const string ImageViewName = "ImageView"
Field Value
System.String
|
IsPanningEnabledProperty
Declaration
public static readonly DependencyProperty IsPanningEnabledProperty
Field Value
System.Windows.DependencyProperty
|
IsReadOnlyProperty
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
System.Windows.DependencyProperty
|
MainImageName
Declaration
public const string MainImageName = "MainImage"
Field Value
System.String
|
MaximumMouseWheelScaleFactor
Declaration
public static readonly double MaximumMouseWheelScaleFactor
Field Value
System.Double
|
MinimumMouseWheelScaleFactor
Declaration
public static readonly double MinimumMouseWheelScaleFactor
Field Value
System.Double
|
PreviewPanelName
Declaration
public const string PreviewPanelName = "PreviewPanel"
Field Value
System.String
|
ScaleFactorProperty
Declaration
public static readonly DependencyProperty ScaleFactorProperty
Field Value
System.Windows.DependencyProperty
|
ScrollContentName
Declaration
public const string ScrollContentName = "ScrollContent"
Field Value
System.String
|
ScrollViewerName
Declaration
public const string ScrollViewerName = "ScrollViewer"
Field Value
System.String
|
ToolSettingsContainerProperty
Declaration
public static readonly DependencyProperty ToolSettingsContainerProperty
Field Value
System.Windows.DependencyProperty
|
ToolSettingsPaneName
Declaration
public const string ToolSettingsPaneName = "ToolSettingsPane"
Field Value
System.String
|
Properties
ActualScaleFactor
Gets the actual scale factor.
Declaration
public double ActualScaleFactor { get; }
Property Value
System.Double
The actual scale factor. |
AllowMouseWheelScaling
Gets or sets the value indicating whether wheel scaling is allowed.
Declaration
public bool AllowMouseWheelScaling { get; set; }
Property Value
System.Boolean
Allow mouse wheel scaling. |
Commands
Gets the image editor commands.
Declaration
public ImageEditorCommands Commands { get; }
Property Value
ImageEditorCommands
The commands. |
ExecutingTool
Gets the tool that is currently executing.
Declaration
public ITool ExecutingTool { get; }
Property Value
ITool
The tool. |
HasImage
Gets a value indicating whether there is image loaded in the image editor.
Declaration
public bool HasImage { get; }
Property Value
System.Boolean
True if there is image loaded in the image editor. |
History
Gets the history.
Declaration
public ImageHistory History { get; }
Property Value
ImageHistory
The history. |
Image
Gets or sets the current image.
Declaration
public RadBitmap Image { get; set; }
Property Value
RadBitmap
The image. |
ImageViewSize
Gets the scaled size of the image.
Declaration
public Size ImageViewSize { get; }
Property Value
System.Windows.Size
The scaled size of the image. |
IsPanningEnabled
Gets or sets a value indicating whether the panning functionality is enabled.
Declaration
public bool IsPanningEnabled { get; set; }
Property Value
System.Boolean
Boolean value indicating whether the panning functionality is enabled. |
IsReadOnly
Gets or sets a value indicating whether the control is read-only.
Declaration
public bool IsReadOnly { get; set; }
Property Value
System.Boolean
|
ScaleFactor
Gets or sets the scale factor. If 0 is set the scale factor is AutoFit.
Declaration
public double ScaleFactor { get; set; }
Property Value
System.Double
The scale factor. |
ToolSettingsContainer
Gets or sets the tool settings container.
Declaration
public IToolSettingsContainer ToolSettingsContainer { get; set; }
Property Value
IToolSettingsContainer
The tool settings container. |
Methods
AutoScaleImage()
Causes this RadImageEditor instance to go into AutoFit mode by settings the ScaleFactor property to 0.
Declaration
public void AutoScaleImage()
CancelExecuteTool()
Cancels currently executing tool.
Declaration
public void CancelExecuteTool()
CommitTool()
Commits the currently executing tool.
Declaration
public void CommitTool()
CommitTool(Boolean)
Commits the currently executing tool.
Declaration
public void CommitTool(bool executeSameToolAfterCommit)
Parameters
System.Boolean
executeSameToolAfterCommit
Execute same tool after commit. |
ExecuteCommand(IImageCommand, Object)
Executes command.
Declaration
public void ExecuteCommand(IImageCommand command, object context)
Parameters
IImageCommand
command
The command. |
System.Object
context
The context. |
ExecuteTool(ITool)
Flip(Orientation)
Flips the loaded image.
Declaration
public void Flip(Orientation flipOrientation)
Parameters
System.Windows.Controls.Orientation
flipOrientation
The flip orientation. |
InvertColors()
Inverts the colors of the image.
Declaration
public void InvertColors()
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnCommandError(CommandErrorEventArgs)
Declaration
protected virtual void OnCommandError(CommandErrorEventArgs args)
Parameters
CommandErrorEventArgs
args
|
OnCommandExecuted(ImageCommandExecutedEventArgs)
Raises the CommandExecuted event.
Declaration
protected virtual void OnCommandExecuted(ImageCommandExecutedEventArgs e)
Parameters
ImageCommandExecutedEventArgs
e
The ImageCommandExecutedEventArgs instance containing the event data. |
OnCommandExecuting(ImageCommandExecutingEventArgs)
Raises the CommandExecuting event.
Declaration
protected virtual void OnCommandExecuting(ImageCommandExecutingEventArgs e)
Parameters
ImageCommandExecutingEventArgs
e
The ImageCommandExecutingEventArgs instance containing the event data. |
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
System.Windows.Automation.Peers.AutomationPeer
|
OnImageViewSizeChanged()
Declaration
protected virtual void OnImageViewSizeChanged()
OnIsReadOnlyChanged(EventArgs)
Raises the IsReadOnlyChanged event.
Declaration
protected virtual void OnIsReadOnlyChanged(EventArgs e)
Parameters
System.EventArgs
e
The System.EventArgs instance containing the event data. |
OnScaleFactorChanged()
Declaration
protected virtual void OnScaleFactorChanged()
OnToolCommitted(ToolCommittedEventArgs)
Raises the ToolCommitted event.
Declaration
protected virtual void OnToolCommitted(ToolCommittedEventArgs e)
Parameters
ToolCommittedEventArgs
e
The ToolCommittedEventArgs instance containing the event data. |
OnToolCommitting(ToolCommittingEventArgs)
Raises the ToolCommitting event.
Declaration
protected virtual void OnToolCommitting(ToolCommittingEventArgs e)
Parameters
ToolCommittingEventArgs
e
The ToolCommittingEventArgs instance containing the event data. |
Redo()
Executes redo.
Declaration
public bool Redo()
Returns
System.Boolean
|
ResetToolSettings()
Resets the currently executing tool settings.
Declaration
public void ResetToolSettings()
Rotate(Double)
Rotates the image.
Declaration
public void Rotate(double degrees)
Parameters
System.Double
degrees
The degrees. |
Rotate(Double, Color)
Rotates the image.
Declaration
public void Rotate(double degrees, Color backgroundColor)
Parameters
System.Double
degrees
The degrees. |
System.Windows.Media.Color
backgroundColor
Color of the background. |
Undo()
Executes Undo.
Declaration
public bool Undo()
Returns
System.Boolean
|
Events
CommandError
Occurs on error while executing command.
Declaration
public event EventHandler<CommandErrorEventArgs> CommandError
Event Type
System.EventHandler<CommandErrorEventArgs>
|
CommandExecuted
Occurs after the execution of ImageEditorCommandBase.
Declaration
public event EventHandler<ImageCommandExecutedEventArgs> CommandExecuted
Event Type
System.EventHandler<ImageCommandExecutedEventArgs>
|
CommandExecuting
Occurs before the execution of ImageEditorCommandBase.
Declaration
public event EventHandler<ImageCommandExecutingEventArgs> CommandExecuting
Event Type
System.EventHandler<ImageCommandExecutingEventArgs>
|
ImageViewSizeChanged
Occurs when the image view size is changed.
Declaration
public event EventHandler ImageViewSizeChanged
Event Type
System.EventHandler
|
IsReadOnlyChanged
Occurs when the IsReadOnly property changes.
Declaration
public event EventHandler IsReadOnlyChanged
Event Type
System.EventHandler
|
ScaleFactorChanged
Occurs when scale factor is changed.
Declaration
public event EventHandler ScaleFactorChanged
Event Type
System.EventHandler
|
ToolCommitted
Occurs when the tool is committed.
Declaration
public event EventHandler<ToolCommittedEventArgs> ToolCommitted
Event Type
System.EventHandler<ToolCommittedEventArgs>
|
ToolCommitting
Occurs before the tool is about to commit.
Declaration
public event EventHandler<ToolCommittingEventArgs> ToolCommitting
Event Type
System.EventHandler<ToolCommittingEventArgs>
|