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.String
|
CanvasElement
Gets the element that is responsible for drawing the image.
Declaration
public ImageEditorCanvasElement CanvasElement { get; }
Property Value
ImageEditorCanvasElement
|
CommandsElement
Gets the element containing the buttons with commands.
Declaration
public ImageEditorCommandsElement CommandsElement { get; }
Property Value
ImageEditorCommandsElement
|
CommandsElementWidth
Gets or sets the width of the CommandsElement.
Declaration
public int CommandsElementWidth { get; set; }
Property Value
System.Int32
|
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.Drawing.Bitmap
|
DialogFactory
Gets or sets a factory used for creating dialogs.
Declaration
public ImageEditorDialogFactory DialogFactory { get; set; }
Property Value
ImageEditorDialogFactory
|
OriginalBitmap
Gets or sets the original image when performing editing operations.
Declaration
protected virtual Bitmap OriginalBitmap { get; set; }
Property Value
System.Drawing.Bitmap
|
RedoStack
Gets the redo operations stack.
Declaration
protected Stack<Bitmap> RedoStack { get; }
Property Value
System.Collections.Generic.Stack<System.Drawing.Bitmap>
|
ScrollViewer
Gets the scroll viewer controller.
Declaration
public RadScrollViewer ScrollViewer { get; }
Property Value
RadScrollViewer
|
UndoStack
Gets the undo operations stack.
Declaration
protected Stack<Bitmap> UndoStack { get; }
Property Value
System.Collections.Generic.Stack<System.Drawing.Bitmap>
|
ZoomElement
Gets the element containing the zooming controls.
Declaration
public ImageEditorZoomElement ZoomElement { get; }
Property Value
ImageEditorZoomElement
|
ZoomElementHeight
Gets or sets the height of the ZoomElement
Declaration
public int ZoomElementHeight { get; set; }
Property Value
System.Int32
|
ZoomFactor
Gets or sets the zoom factor of the editor.
Declaration
public SizeF ZoomFactor { get; set; }
Property Value
System.Drawing.SizeF
|
Methods
ArrangeOverride(SizeF)
Declaration
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters
System.Drawing.SizeF
finalSize
|
Returns
System.Drawing.SizeF
|
Overrides
Blur(Int32)
Declaration
public virtual void Blur(int bias)
Parameters
System.Int32
bias
|
CalculateZoomOffset(SizeF, SizeF, SizeF)
Declaration
protected virtual SizeF CalculateZoomOffset(SizeF oldCanvasSize, SizeF newCanvasSize, SizeF oldOffset)
Parameters
System.Drawing.SizeF
oldCanvasSize
|
System.Drawing.SizeF
newCanvasSize
|
System.Drawing.SizeF
oldOffset
|
Returns
System.Drawing.SizeF
|
CancelAsync()
Declaration
public virtual void CancelAsync()
CloseOpenDialog()
Closes the open dialog.
Declaration
public void CloseOpenDialog()
CreateCanvasElement()
Declaration
protected virtual ImageEditorCanvasElement CreateCanvasElement()
Returns
ImageEditorCanvasElement
|
CreateCanvasViewport()
CreateChildElements()
Declaration
protected override void CreateChildElements()
Overrides
CreateCommandsElement()
Declaration
protected virtual ImageEditorCommandsElement CreateCommandsElement()
Returns
ImageEditorCommandsElement
|
CreateScrollViewer()
CreateZoomElement()
Declaration
protected virtual ImageEditorZoomElement CreateZoomElement()
Returns
ImageEditorZoomElement
|
Crop(Rectangle)
Declaration
public virtual void Crop(Rectangle cropRect)
Parameters
System.Drawing.Rectangle
cropRect
|
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.Drawing.Drawing2D.GraphicsPath
shape
|
System.Drawing.Color
fill
|
System.Drawing.Color
stroke
|
System.Int32
borderThickness
|
System.Nullable<ShapeType>
shapeType
|
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.String
text
|
System.Int32
fontSize
|
System.Drawing.Color
foreColor
|
System.Int32
x
|
System.Int32
y
|
System.Int32
angle
|
GetImageArray()
Declaration
protected virtual byte[] GetImageArray()
Returns
System.Byte[]
|
GetNumberOfBytes(BitmapData)
Declaration
protected virtual int GetNumberOfBytes(BitmapData data)
Parameters
System.Drawing.Imaging.BitmapData
data
|
Returns
System.Int32
|
InvertColors()
Declaration
public virtual void InvertColors()
LoadAsync()
Declaration
public virtual void LoadAsync()
LoadAsync(String)
Declaration
public virtual void LoadAsync(string url)
Parameters
System.String
url
|
MeasureOverride(SizeF)
Declaration
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters
System.Drawing.SizeF
availableSize
|
Returns
System.Drawing.SizeF
|
Overrides
OnCurrentImageChanged(ImageChangedEventArgs)
Fires the CurrentImageChanged event.
Declaration
protected virtual void OnCurrentImageChanged(ImageChangedEventArgs e)
Parameters
ImageChangedEventArgs
e
|
OnImageLoadAsyncProgressChanged(ProgressChangedEventArgs)
Fires the ImageLoadAsyncProgressChanged event.
Declaration
protected virtual void OnImageLoadAsyncProgressChanged(ProgressChangedEventArgs e)
Parameters
System.ComponentModel.ProgressChangedEventArgs
e
|
OnImageLoaded(AsyncCompletedEventArgs)
Fires the ImageLoaded event.
Declaration
protected virtual void OnImageLoaded(AsyncCompletedEventArgs e)
Parameters
System.ComponentModel.AsyncCompletedEventArgs
e
|
OnImageSaved(EventArgs)
Declaration
protected virtual void OnImageSaved(EventArgs e)
Parameters
System.EventArgs
e
|
OnPaintShape(PaintShapeEventArgs)
Declaration
protected virtual void OnPaintShape(PaintShapeEventArgs e)
Parameters
PaintShapeEventArgs
e
|
OpenImage()
Declaration
public virtual void OpenImage()
OpenImage(Bitmap)
Declaration
public virtual void OpenImage(Bitmap image)
Parameters
System.Drawing.Bitmap
image
|
OpenImage(String)
Declaration
public virtual void OpenImage(string fileName)
Parameters
System.String
fileName
|
ProcessDoubleClick(MouseEventArgs)
Declaration
protected virtual bool ProcessDoubleClick(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
ProcessKeyDown(KeyEventArgs)
Declaration
protected virtual bool ProcessKeyDown(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
Returns
System.Boolean
|
ProcessKeyPress(KeyPressEventArgs)
Declaration
protected virtual bool ProcessKeyPress(KeyPressEventArgs e)
Parameters
System.Windows.Forms.KeyPressEventArgs
e
|
Returns
System.Boolean
|
ProcessKeyUp(KeyEventArgs)
Declaration
protected virtual bool ProcessKeyUp(KeyEventArgs e)
Parameters
System.Windows.Forms.KeyEventArgs
e
|
Returns
System.Boolean
|
ProcessMouseClick(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseClick(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
ProcessMouseDown(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseDown(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
ProcessMouseEnter(EventArgs)
Declaration
protected virtual bool ProcessMouseEnter(EventArgs e)
Parameters
System.EventArgs
e
|
Returns
System.Boolean
|
ProcessMouseHover(EventArgs)
Declaration
protected virtual bool ProcessMouseHover(EventArgs e)
Parameters
System.EventArgs
e
|
Returns
System.Boolean
|
ProcessMouseLeave(EventArgs)
Declaration
protected virtual bool ProcessMouseLeave(EventArgs e)
Parameters
System.EventArgs
e
|
Returns
System.Boolean
|
ProcessMouseMove(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseMove(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
ProcessMouseUp(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseUp(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
ProcessMouseWheel(MouseEventArgs)
Declaration
protected virtual bool ProcessMouseWheel(MouseEventArgs e)
Parameters
System.Windows.Forms.MouseEventArgs
e
|
Returns
System.Boolean
|
Redo()
Declaration
public virtual void Redo()
Resize(Int32, Int32)
Declaration
public virtual void Resize(int width, int height)
Parameters
System.Int32
width
|
System.Int32
height
|
ResizeCanvas(Int32, Int32, ContentAlignment, Color)
Declaration
public virtual void ResizeCanvas(int width, int height, ContentAlignment imageAlignemnt, Color background)
Parameters
System.Int32
width
|
System.Int32
height
|
System.Drawing.ContentAlignment
imageAlignemnt
|
System.Drawing.Color
background
|
RotateFlip(RotateFlipType)
Declaration
public virtual void RotateFlip(RotateFlipType rotateFlipType)
Parameters
System.Drawing.RotateFlipType
rotateFlipType
|
RoundCorners(Int32, Color, Int32, Color)
Declaration
public virtual void RoundCorners(int cornerRadius, Color background, int borderThickness, Color borderColor)
Parameters
System.Int32
cornerRadius
|
System.Drawing.Color
background
|
System.Int32
borderThickness
|
System.Drawing.Color
borderColor
|
SaveImage()
Declaration
public virtual void SaveImage()
SaveImage(Stream)
Declaration
public virtual void SaveImage(Stream stream)
Parameters
System.IO.Stream
stream
|
SaveImage(Stream, ImageFormat)
Declaration
public virtual void SaveImage(Stream stream, ImageFormat imageFormat)
Parameters
System.IO.Stream
stream
|
System.Drawing.Imaging.ImageFormat
imageFormat
|
SaveImage(String)
Declaration
public virtual void SaveImage(string path)
Parameters
System.String
path
|
SaveImage(String, ImageFormat)
Declaration
public virtual void SaveImage(string path, ImageFormat imageFormat)
Parameters
System.String
path
|
System.Drawing.Imaging.ImageFormat
imageFormat
|
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.Int32
contrast
|
System.Int32
brightness
|
SetHue(Int32)
Declaration
public virtual void SetHue(int hue)
Parameters
System.Int32
hue
|
SetImageArray(ref Byte[])
Declaration
protected virtual void SetImageArray(ref byte[] rgbValues)
Parameters
System.Byte[]
rgbValues
|
SetNewBitmap(Bitmap, Boolean)
Declaration
protected virtual void SetNewBitmap(Bitmap value, bool disposeOldState)
Parameters
System.Drawing.Bitmap
value
|
System.Boolean
disposeOldState
|
SetSaturation(Int32)
Declaration
public virtual void SetSaturation(int saturation)
Parameters
System.Int32
saturation
|
Sharpen(Double)
Declaration
public virtual void Sharpen(double strength)
Parameters
System.Double
strength
|
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.Type
dialogType
|
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.Type
dialogType
|
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.Boolean
commit
|
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
ImageChangedEventHandler
|
ImageLoadAsyncProgressChanged
Occurs when the progress of an async load operation changes.
Declaration
public event ProgressChangedEventHandler ImageLoadAsyncProgressChanged
Event Type
System.ComponentModel.ProgressChangedEventHandler
|
ImageLoaded
Occurs after an image is loaded in the editor.
Declaration
public event AsyncCompletedEventHandler ImageLoaded
Event Type
System.ComponentModel.AsyncCompletedEventHandler
|
ImageSaved
Occurs when the image is saved.
Declaration
public event EventHandler ImageSaved
Event Type
System.EventHandler
|
OperationError
Occurs when an operation results in an error or an exception.
Declaration
public event ErrorEventHandler OperationError
Event Type
System.IO.ErrorEventHandler
|
PaintShape
Allows to customize the painted shape or draw a custom one.
Declaration
public event PaintShapeEventHandler PaintShape
Event Type
PaintShapeEventHandler
|