ClassRadImageEditor
RadImageEditor is powerful UI component for image editing.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.ImageEditor.dll
Syntax:
[TelerikToolboxCategory("Input")]
public class RadImageEditor : Control
Inheritance: objectRadImageEditor
Constructors
RadImageEditor()
Declaration
public RadImageEditor()
Fields
AllowMouseWheelScalingProperty
Declaration
public static readonly DependencyProperty AllowMouseWheelScalingProperty
Field Value
DependencyProperty
ImageProperty
Declaration
public static readonly DependencyProperty ImageProperty
Field Value
DependencyProperty
IsPanningEnabledProperty
Declaration
public static readonly DependencyProperty IsPanningEnabledProperty
Field Value
DependencyProperty
IsReadOnlyProperty
Declaration
public static readonly DependencyProperty IsReadOnlyProperty
Field Value
DependencyProperty
MaximumMouseWheelScaleFactor
Declaration
public static readonly double MaximumMouseWheelScaleFactor
Field Value
MinimumMouseWheelScaleFactor
Declaration
public static readonly double MinimumMouseWheelScaleFactor
Field Value
PreviewPanelName
Declaration
public const string PreviewPanelName = "PreviewPanel"
Field Value
ScaleFactorProperty
Declaration
public static readonly DependencyProperty ScaleFactorProperty
Field Value
DependencyProperty
ScrollContentName
Declaration
public const string ScrollContentName = "ScrollContent"
Field Value
ScrollViewerName
Declaration
public const string ScrollViewerName = "ScrollViewer"
Field Value
ToolSettingsContainerProperty
Declaration
public static readonly DependencyProperty ToolSettingsContainerProperty
Field Value
DependencyProperty
ToolSettingsPaneName
Declaration
public const string ToolSettingsPaneName = "ToolSettingsPane"
Field Value
ZoomToCursorProperty
Declaration
public static readonly DependencyProperty ZoomToCursorProperty
Field Value
DependencyProperty
Properties
ActualScaleFactor
Gets the actual scale factor.
Declaration
public double ActualScaleFactor { get; }
Property Value
The actual scale factor.
AllowMouseWheelScaling
Gets or sets the value indicating whether wheel scaling is allowed.
Declaration
public bool AllowMouseWheelScaling { get; set; }
Property Value
Allow mouse wheel scaling.
Commands
Gets the image editor commands.
Declaration
public ImageEditorCommands Commands { get; }
Property Value
The commands.
ExecutingTool
Gets the tool that is currently executing.
HasImage
Gets a value indicating whether there is image loaded in the image editor.
Declaration
public bool HasImage { get; }
Property Value
True if there is image loaded in the image editor.
History
Gets the history.
Declaration
public ImageHistory History { get; }
Property Value
The history.
Image
Gets or sets the current image.
Declaration
public RadBitmap Image { get; set; }
Property Value
The image.
ImageViewSize
Gets the scaled size of the image.
Declaration
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
public bool IsPanningEnabled { get; set; }
Property Value
Boolean value indicating whether the panning functionality is enabled.
IsReadOnly
Gets or sets a value indicating whether the control is read-only.
ScaleFactor
Gets or sets the scale factor. If 0 is set the scale factor is AutoFit.
Declaration
public double ScaleFactor { get; set; }
Property Value
The scale factor.
ToolSettingsContainer
Gets or sets the tool settings container.
Declaration
public IToolSettingsContainer ToolSettingsContainer { get; set; }
Property Value
The tool settings container.
ZoomToCursor
Gets or sets the value indicating whether wheel scaling is performed towards the mouse cursor on the image.
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(bool)
Commits the currently executing tool.
Declaration
public void CommitTool(bool executeSameToolAfterCommit)
Parameters
executeSameToolAfterCommit
Execute same tool after commit.
ExecuteCommand(IImageCommand, object)
Executes command.
Declaration
public void ExecuteCommand(IImageCommand command, object context)
Parameters
command
The command.
context
The context.
ExecuteTool(ITool)
Executes tool.
Flip(Orientation)
Flips the loaded image.
Declaration
public void Flip(Orientation flipOrientation)
Parameters
flipOrientation
Orientation
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
args
OnCommandExecuted(ImageCommandExecutedEventArgs)
Raises the event.
Declaration
protected virtual void OnCommandExecuted(ImageCommandExecutedEventArgs e)
Parameters
e
The ImageCommandExecutedEventArgs instance containing the event data.
OnCommandExecuting(ImageCommandExecutingEventArgs)
Raises the event.
Declaration
protected virtual void OnCommandExecuting(ImageCommandExecutingEventArgs e)
Parameters
e
ImageCommandExecutingEventArgs
The ImageCommandExecutingEventArgs instance containing the event data.
OnCreateAutomationPeer()
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
AutomationPeer
OnImageViewSizeChanged()
Declaration
protected virtual void OnImageViewSizeChanged()
OnInitialized(EventArgs)
Raises the event. This method is invoked whenever is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
e
The RoutedEventArgs that contains the event data.
OnIsReadOnlyChanged(EventArgs)
Raises the event.
OnScaleFactorChanged()
Declaration
protected virtual void OnScaleFactorChanged()
OnToolCommitted(ToolCommittedEventArgs)
Raises the event.
Declaration
protected virtual void OnToolCommitted(ToolCommittedEventArgs e)
Parameters
e
The ToolCommittedEventArgs instance containing the event data.
OnToolCommitting(ToolCommittingEventArgs)
Raises the event.
Declaration
protected virtual void OnToolCommitting(ToolCommittingEventArgs e)
Parameters
e
The ToolCommittingEventArgs instance containing the event data.
ResetToolSettings()
Resets the currently executing tool settings.
Declaration
public void ResetToolSettings()
Rotate(double)
Rotates the image.
Declaration
public void Rotate(double degrees)
Parameters
degrees
The degrees.
Rotate(double, Color)
Rotates the image.
Declaration
public void Rotate(double degrees, Color backgroundColor)
Parameters
degrees
The degrees.
backgroundColor
Color
Color of the background.
Events
CommandError
Occurs on error while executing command.
Declaration
public event EventHandler<CommandErrorEventArgs> CommandError
Event Value
CommandExecuted
Occurs after the execution of ImageEditorCommandBase.
Declaration
public event EventHandler<ImageCommandExecutedEventArgs> CommandExecuted
Event Value
CommandExecuting
Occurs before the execution of ImageEditorCommandBase.
Declaration
public event EventHandler<ImageCommandExecutingEventArgs> CommandExecuting
Event Value
ImageViewSizeChanged
Occurs when the image view size is changed.
Declaration
public event EventHandler ImageViewSizeChanged
Event Value
IsReadOnlyChanged
Occurs when the IsReadOnly property changes.
ScaleFactorChanged
Occurs when scale factor is changed.
ToolCommitted
Occurs when the tool is committed.
Declaration
public event EventHandler<ToolCommittedEventArgs> ToolCommitted
Event Value
ToolCommitting
Occurs before the tool is about to commit.
Declaration
public event EventHandler<ToolCommittingEventArgs> ToolCommitting
Event Value