Class RadImageEditorElement
Inheritance
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
public class RadImageEditorElement : LightVisualElement, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IComponent, IDisposable, IBindableComponent, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IPrimitiveElement, IShapedElement, IFillElement, IBorderElement, IBoxStyle, IBoxElement, IImageElement, ITextPrimitive, ITextProvider
Constructors
RadImageEditorElement()
Declaration
public RadImageEditorElement()
Fields
CommandsElementWidthProperty
ZoomElementHeightProperty
Properties
BitmapPath
Gets or sets the path that will be used for save operations.
Declaration
public string BitmapPath { get; set; }
Property Value
System.
|
CanvasElement
Gets the element that is responsible for drawing the image.
Declaration
public ImageEditorCanvasElement CanvasElement { get; }
Property Value
CommandsElement
Gets the element containing the buttons with commands.
Declaration
public ImageEditorCommandsElement CommandsElement { get; }
Property Value
CommandsElementWidth
Gets or sets the width of the Commands
Declaration
public int CommandsElementWidth { get; set; }
Property Value
System.
|
CurrentBitmap
Gets or sets the current bitmap. If you want to open an image for edit use one of the OpenImage methods.
Declaration
public Bitmap CurrentBitmap { get; set; }
Property Value
System.
|
DialogFactory
Gets or sets a factory used for creating dialogs.
Declaration
public ImageEditorDialogFactory DialogFactory { get; set; }
Property Value
OriginalBitmap
Gets or sets the original image when performing editing operations.
Declaration
protected virtual Bitmap OriginalBitmap { get; set; }
Property Value
System.
|
RedoStack
Gets the redo operations stack.
Declaration
protected Stack<Bitmap> RedoStack { get; }
Property Value
System.
|
ScrollViewer
Gets the scroll viewer controller.
Declaration
public RadScrollViewer ScrollViewer { get; }
Property Value
UndoStack
Gets the undo operations stack.
Declaration
protected Stack<Bitmap> UndoStack { get; }
Property Value
System.
|
ZoomElement
Gets the element containing the zooming controls.
Declaration
public ImageEditorZoomElement ZoomElement { get; }
Property Value
ZoomElementHeight
Gets or sets the height of the Zoom
Declaration
public int ZoomElementHeight { get; set; }
Property Value
System.
|
ZoomFactor
Gets or sets the zoom factor of the editor.
Declaration
public SizeF ZoomFactor { get; set; }
Property Value
System.
|
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.
|
Returns
System.
|
Overrides
Blur(Int32)
Declaration
public virtual void Blur(int bias)
Parameters
System.
|
CalculateZoomOffset(SizeF, SizeF, SizeF)
Declaration
protected virtual SizeF CalculateZoomOffset(SizeF oldCanvasSize, SizeF newCanvasSize, SizeF oldOffset)
Parameters
System.
|
System.
|
System.
|
Returns
System.
|
CancelAsync()
Declaration
public virtual void CancelAsync()
CloseOpenDialog()
Closes the open dialog.
Declaration
public void CloseOpenDialog()
CreateCanvasElement()
Declaration
protected virtual ImageEditorCanvasElement CreateCanvasElement()
Returns
CreateCanvasViewport()
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
CreateCommandsElement()
Declaration
protected virtual ImageEditorCommandsElement CreateCommandsElement()
Returns
CreateScrollViewer()
CreateZoomElement()
Declaration
protected virtual ImageEditorZoomElement CreateZoomElement()
Returns
Crop(Rectangle)
Declaration
public virtual void Crop(Rectangle cropRect)
Parameters
System.
|
DisposeBitmaps()
Declaration
protected virtual void DisposeBitmaps()
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
DrawShape(GraphicsPath, Color, Color, Int32, Nullable<ShapeType>)
Declaration
public virtual void DrawShape(GraphicsPath shape, Color fill, Color stroke, int borderThickness, ShapeType? shapeType = default(ShapeType? ))
Parameters
System.
|
System.
|
System.
|
System.
|
System.
|
DrawString(String, Int32, Color, Int32, Int32, Int32)
Declaration
public virtual void DrawString(string text, int fontSize, Color foreColor, int x, int y, int angle)
Parameters
System.
|
System.
|
System.
|
System.
|
System.
|
System.
|
GetImageArray()
Declaration
protected virtual byte[] GetImageArray()
Returns
System.
|
GetNumberOfBytes(BitmapData)
Declaration
protected virtual int GetNumberOfBytes(BitmapData data)
Parameters
System.
|
Returns
System.
|
InvertColors()
Declaration
public virtual void InvertColors()
LoadAsync()
Declaration
public virtual void LoadAsync()
LoadAsync(String)
Declaration
public virtual void LoadAsync(string url)
Parameters
System.
|
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.
|
Returns
System.
|
Overrides
OnCurrentImageChanged(ImageChangedEventArgs)
Fires the Current
Declaration
protected virtual void OnCurrentImageChanged(ImageChangedEventArgs e)
Parameters
OnImageLoadAsyncProgressChanged(ProgressChangedEventArgs)
Fires the Image
Declaration
protected virtual void OnImageLoadAsyncProgressChanged(ProgressChangedEventArgs e)
Parameters
System.
|
OnImageLoaded(AsyncCompletedEventArgs)
Fires the Image
Declaration
protected virtual void OnImageLoaded(AsyncCompletedEventArgs e)
Parameters
System.
|
OnImageSaved(EventArgs)
Declaration
protected virtual void OnImageSaved(EventArgs e)
Parameters
System.
|
OnPaintShape(PaintShapeEventArgs)
Declaration
protected virtual void OnPaintShape(PaintShapeEventArgs e)
Parameters
OpenImage()
Declaration
public virtual void OpenImage()
OpenImage(Bitmap)
Declaration
public virtual void OpenImage(Bitmap image)
Parameters
System.
|
OpenImage(String)
Declaration
public virtual void OpenImage(string fileName)
Parameters
System.
|
ProcessDoubleClick(MouseEventArgs)
Declaration
protected virtual bool ProcessDoubleClick(MouseEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessKeyDown(KeyEventArgs)
Declaration
protected virtual bool ProcessKeyDown(KeyEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessKeyPress(KeyPressEventArgs)
Declaration
protected virtual bool ProcessKeyPress(KeyPressEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessKeyUp(KeyEventArgs)
Declaration
protected virtual bool ProcessKeyUp(KeyEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseClick(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseClick(MouseEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseDown(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseDown(MouseEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseEnter(EventArgs)
Declaration
protected virtual bool ProcessMouseEnter(EventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseHover(EventArgs)
Declaration
protected virtual bool ProcessMouseHover(EventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseLeave(EventArgs)
Declaration
protected virtual bool ProcessMouseLeave(EventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseMove(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseMove(MouseEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseUp(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseUp(MouseEventArgs e)
Parameters
System.
|
Returns
System.
|
ProcessMouseWheel(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseWheel(MouseEventArgs e)
Parameters
System.
|
Returns
System.
|
Redo()
Declaration
public virtual void Redo()
Resize(Int32, Int32)
Declaration
public virtual void Resize(int width, int height)
Parameters
System.
|
System.
|
ResizeCanvas(Int32, Int32, ContentAlignment, Color)
Declaration
public virtual void ResizeCanvas(int width, int height, ContentAlignment imageAlignemnt, Color background)
Parameters
System.
|
System.
|
System.
|
System.
|
RotateFlip(RotateFlipType)
Declaration
public virtual void RotateFlip(RotateFlipType rotateFlipType)
Parameters
System.
|
RoundCorners(Int32, Color, Int32, Color)
Declaration
public virtual void RoundCorners(int cornerRadius, Color background, int borderThickness, Color borderColor)
Parameters
System.
|
System.
|
System.
|
System.
|
SaveImage()
Declaration
public virtual void SaveImage()
SaveImage(Stream)
Declaration
public virtual void SaveImage(Stream stream)
Parameters
System.
|
SaveImage(Stream, ImageFormat)
Declaration
public virtual void SaveImage(Stream stream, ImageFormat imageFormat)
Parameters
System.
|
System.
|
SaveImage(String)
Declaration
public virtual void SaveImage(string path)
Parameters
System.
|
SaveImage(String, ImageFormat)
Declaration
public virtual void SaveImage(string path, ImageFormat imageFormat)
Parameters
System.
|
System.
|
SaveImageAs()
Declaration
public virtual void SaveImageAs()
SaveState()
Declaration
public virtual void SaveState()
SetContrastAndBrightness(Int32, Int32)
Declaration
public virtual void SetContrastAndBrightness(int contrast, int brightness)
Parameters
System.
|
System.
|
SetHue(Int32)
Declaration
public virtual void SetHue(int hue)
Parameters
System.
|
SetImageArray(ref Byte[])
Declaration
protected virtual void SetImageArray(ref byte[] rgbValues)
Parameters
System.
|
SetNewBitmap(Bitmap, Boolean)
Declaration
protected virtual void SetNewBitmap(Bitmap value, bool disposeOldState)
Parameters
System.
|
System.
|
SetSaturation(Int32)
Declaration
public virtual void SetSaturation(int saturation)
Parameters
System.
|
Sharpen(Double)
Declaration
public virtual void Sharpen(double strength)
Parameters
System.
|
ShowBlurDialog()
Declaration
public virtual void ShowBlurDialog()
ShowCanvasResizeDialog()
Declaration
public virtual void ShowCanvasResizeDialog()
ShowContrastDialog()
Declaration
public virtual void ShowContrastDialog()
ShowDialog(Type)
Declaration
protected virtual void ShowDialog(Type dialogType)
Parameters
System.
|
ShowDrawDialog()
Declaration
public virtual void ShowDrawDialog()
ShowDrawShapeDialog()
Declaration
public virtual void ShowDrawShapeDialog()
ShowDrawTextDialog()
Declaration
public virtual void ShowDrawTextDialog()
ShowHueDialog()
Declaration
public virtual void ShowHueDialog()
ShowResizeDialog()
Declaration
public virtual void ShowResizeDialog()
ShowRoundCornersDialog()
Declaration
public virtual void ShowRoundCornersDialog()
ShowSaturationDialog()
Declaration
public virtual void ShowSaturationDialog()
ShowSharpenDialog()
Declaration
public virtual void ShowSharpenDialog()
ShowTopMostDialog(Type)
Declaration
protected virtual void ShowTopMostDialog(Type dialogType)
Parameters
System.
|
StartCrop()
Declaration
public virtual void StartCrop()
StartDrawing(ShapeInfo)
StartPan()
Declaration
public virtual void StartPan()
StopCrop(Boolean)
Declaration
public virtual void StopCrop(bool commit)
Parameters
System.
|
StopDrawing()
Declaration
public virtual void StopDrawing()
StopPan()
Declaration
public virtual void StopPan()
Undo()
Declaration
public virtual void Undo()
UpdateUndoRedoButtons()
Declaration
protected virtual void UpdateUndoRedoButtons()
Events
CurrentImageChanged
Occurs when a specific operation is performed over the current bitmap
Declaration
public event ImageChangedEventHandler CurrentImageChanged
Event Type
ImageLoadAsyncProgressChanged
Occurs when the progress of an async load operation changes.
Declaration
public event ProgressChangedEventHandler ImageLoadAsyncProgressChanged
Event Type
System.
|
ImageLoaded
Occurs after an image is loaded in the editor.
Declaration
public event AsyncCompletedEventHandler ImageLoaded
Event Type
System.
|
ImageSaved
Occurs when the image is saved.
Declaration
public event EventHandler ImageSaved
Event Type
System.
|
OperationError
Occurs when an operation results in an error or an exception.
Declaration
public event ErrorEventHandler OperationError
Event Type
System.
|
PaintShape
Allows to customize the painted shape or draw a custom one.
Declaration
public event PaintShapeEventHandler PaintShape