RadImageEditor
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
public RadImageEditor()
Fields
AllowMouseWheelScalingProperty
DependencyProperty
public static readonly DependencyProperty AllowMouseWheelScalingProperty
ImageProperty
DependencyProperty
public static readonly DependencyProperty ImageProperty
public const string ImageViewName = "ImageView"
IsPanningEnabledProperty
DependencyProperty
public static readonly DependencyProperty IsPanningEnabledProperty
IsReadOnlyProperty
DependencyProperty
public static readonly DependencyProperty IsReadOnlyProperty
public const string MainImageName = "MainImage"
public static readonly double MaximumMouseWheelScaleFactor
public static readonly double MinimumMouseWheelScaleFactor
public const string PreviewPanelName = "PreviewPanel"
ScaleFactorProperty
DependencyProperty
public static readonly DependencyProperty ScaleFactorProperty
public const string ScrollContentName = "ScrollContent"
public const string ScrollViewerName = "ScrollViewer"
ToolSettingsContainerProperty
DependencyProperty
public static readonly DependencyProperty ToolSettingsContainerProperty
public const string ToolSettingsPaneName = "ToolSettingsPane"
ZoomToCursorProperty
DependencyProperty
public static readonly DependencyProperty ZoomToCursorProperty
Properties
Gets the actual scale factor.
public double ActualScaleFactor { get; }
The actual scale factor.
Gets or sets the value indicating whether wheel scaling is allowed.
public bool AllowMouseWheelScaling { get; set; }
Allow mouse wheel scaling.
Gets the image editor commands.
public ImageEditorCommands Commands { get; }
The commands.
Gets the tool that is currently executing.
public ITool ExecutingTool { get; }
The tool.
Gets a value indicating whether there is image loaded in the image editor.
public bool HasImage { get; }
True if there is image loaded in the image editor.
Gets the history.
public ImageHistory History { get; }
The history.
Gets or sets the current image.
public RadBitmap Image { get; set; }
The image.
ImageViewSize
Size
Gets the scaled size of the image.
public Size ImageViewSize { get; }
The scaled size of the image.
Gets or sets a value indicating whether the panning functionality is enabled.
public bool IsPanningEnabled { get; set; }
Boolean value indicating whether the panning functionality is enabled.
Gets or sets a value indicating whether the control is read-only.
public bool IsReadOnly { get; set; }
Gets or sets the scale factor. If 0 is set the scale factor is AutoFit.
public double ScaleFactor { get; set; }
The scale factor.
Gets or sets the tool settings container.
public IToolSettingsContainer ToolSettingsContainer { get; set; }
The tool settings container.
Gets or sets the value indicating whether wheel scaling is performed towards the mouse cursor on the image.
public bool ZoomToCursor { get; set; }
Methods
Causes this RadImageEditor instance to go into AutoFit mode by settings the ScaleFactor property to 0.
public void AutoScaleImage()
Cancels currently executing tool.
public void CancelExecuteTool()
Commits the currently executing tool.
public void CommitTool()
Commits the currently executing tool.
public void CommitTool(bool executeSameToolAfterCommit)
Execute same tool after commit.
Executes command.
public void ExecuteCommand(IImageCommand command, object context)
The command.
contextobjectThe context.
Executes tool.
Flips the loaded image.
public void Flip(Orientation flipOrientation)
The flip orientation.
Inverts the colors of the image.
public void InvertColors()
public override void OnApplyTemplate()
protected virtual void OnCommandError(CommandErrorEventArgs args)
Raises the event.
protected virtual void OnCommandExecuted(ImageCommandExecutedEventArgs e)
The ImageCommandExecutedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnCommandExecuting(ImageCommandExecutingEventArgs e)
The ImageCommandExecutingEventArgs instance containing the event data.
OnCreateAutomationPeer()
AutomationPeer
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
protected virtual void OnImageViewSizeChanged()
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
protected virtual void OnScaleFactorChanged()
Raises the event.
protected virtual void OnToolCommitted(ToolCommittedEventArgs e)
The ToolCommittedEventArgs instance containing the event data.
Raises the event.
protected virtual void OnToolCommitting(ToolCommittingEventArgs e)
The ToolCommittingEventArgs instance containing the event data.
Resets the currently executing tool settings.
public void ResetToolSettings()
Rotates the image.
public void Rotate(double degrees, Color backgroundColor)
The degrees.
backgroundColorColorColor of the background.
Rotates the image.
Events
Occurs on error while executing command.
public event EventHandler<CommandErrorEventArgs> CommandError
Occurs after the execution of ImageEditorCommandBase.
public event EventHandler<ImageCommandExecutedEventArgs> CommandExecuted
Occurs before the execution of ImageEditorCommandBase.
public event EventHandler<ImageCommandExecutingEventArgs> CommandExecuting
Occurs when the image view size is changed.
public event EventHandler ImageViewSizeChanged
Occurs when the IsReadOnly property changes.
public event EventHandler IsReadOnlyChanged
Occurs when scale factor is changed.
public event EventHandler ScaleFactorChanged
Occurs when the tool is committed.
public event EventHandler<ToolCommittedEventArgs> ToolCommitted
Occurs before the tool is about to commit.
public event EventHandler<ToolCommittingEventArgs> ToolCommitting