New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Telerik Image Editor control.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(RadImageEditorScripts))]
[ClientScriptResource("Telerik.Web.UI.RadImageEditor", "Telerik.Web.UI.Common.Core.js")]
[TelerikToolboxCategory("Miscellaneous")]
[ToolboxBitmap(typeof(RadImageEditor), "Toolbox.Icons.ImageEditor.png")]
[EmbeddedSkin("ImageEditor")]
[EmbeddedSkin("ImageEditor", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadImageEditor))]
public class RadImageEditor : RadWebControl, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, INamingContainer

Inheritance: objectControlWebControlRadWebControlRadImageEditor

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorINamingContainerIParserAccessorIPostBackDataHandlerIScriptControlISkinnableControlIUrlResolutionService...

Inherited Members WebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.CreateControlStyle()WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.IsEnabledWebControl.SupportsDisabledAttributeWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind()Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.MapPathSecure(string)Control.OpenFile(string)Control.OnPreRender(EventArgs)Control.BuildProfileTree(string, bool)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadImageEditor()

Fields

C#
public const string CanvasToolsPath = "Telerik.Web.UI.ImageEditor.Resources.CanvasTools.xml"
C#
public const string DefaultHandlerUrl = "~/Telerik.Web.UI.WebResource.axd"
C#
public const string DefaultToolsPath = "Telerik.Web.UI.ImageEditor.Resources.ToolsFile.xml"
C#
public const string FlipBothImageUrl = "Telerik.Web.UI.Skins.Common.ImageEditor.flipBoth.png"
C#
public const string FlipHorizontalImageUrl = "Telerik.Web.UI.Skins.Common.ImageEditor.flipHorizontal.png"
C#
public const string FlipNoneImageUrl = "Telerik.Web.UI.Skins.Common.ImageEditor.flipNone.png"
C#
public const string FlipVerticalImageUrl = "Telerik.Web.UI.Skins.Common.ImageEditor.flipVertical.png"

Properties

Gets the name of the last (active) command executed by the ImageEditor.

C#
[ClientControlProperty]
[ClientPropertyName("currentCommand")]
public virtual string ActiveCommand { get; }

Gets or sets a value that indicates where the user is allowed to save the image. The options available are: "Client", "Server" and "ClientAndServer". The default is ClientAndServer.

C#
[ClientControlProperty]
[ClientPropertyName("allowedSavingLocation")]
public virtual AllowedSavingLocation AllowedSavingLocation { get; set; }

Gets or sets the alternate text displayed in the edited image when the image is unavailable.

C#
public virtual string AlternateText { get; set; }

Gets or sets a value that indicates whether or not the canvas mode of the ImageEditor will be enabled.

C#
[ClientControlProperty]
[ClientPropertyName("canvasMode")]
public virtual CanvasMode CanvasMode { get; set; }
C#
protected virtual FileBrowserContentProvider ContentProvider { get; set; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadWebControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Gets the unique identifier of the current EditableImage.

C#
[ClientControlProperty]
[ClientPropertyName("imageKey")]
public virtual string CurrentImageKey { get; protected set; }
C#
public virtual string CurrentImageUrl { get; protected set; }

Gets or sets the location to a detailed description for the edited image.

C#
public virtual string DescriptionUrl { get; set; }

Specify settings related to the EditableImage behavior.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public EditableImageConfiguration EditableImageSettings { get; }

Gets or sets a bool value that indicates whether the control can be resized.

C#
[ClientControlProperty]
[ClientPropertyName("enableResize")]
public bool EnableResize { get; set; }

Gets or sets a value indicating where the image editor will look for its dialogs.

C#
public virtual string ExternalDialogsPath { get; set; }
Property Value:

A relative path to the dialogs location. For example: "~/controls/RadImageEditorDialogs/".

If specified, the ExternalDialogsPath property will allow you to customize and load the image editor dialogs from normal ASCX files.

Gets or sets the height of the RadImageEditor control

C#
[ClientControlProperty]
[ClientPropertyName("height")]
public override Unit Height { get; set; }

Overrides: RadWebControl.Height

Specifies the URL of the HTTPHandler that serves the cached image.

C#
public virtual string HttpHandlerUrl { get; set; }

The HTTPHandler should either be registered in the application configuration file, or a file with the specified name should exist at the location, which HttpHandlerUrl points to.

If a file is to serve the files, it should inherit the class Telerik.Web.UI.WebResource

Specifies where the cached imaged from the operation will be stored When the image is stored in the session the HttpHandler definition (in the web.config file) must be changed from type="Telerik.Web.UI.WebResource" to type="Telerik.Web.UI.WebResourceSession" so that the image can be retrieved from the Session.

C#
public virtual ImageStorage ImageCacheStorageLocation { get; set; }

Configures the ImageEditor's ContentProvider.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public ImageManagerConfiguration ImageManager { get; }

GUID key used to get all the image keys from the CacheProvider, related with the current instance of the ImageEditor control.

C#
public virtual string ImageStorageKey { get; }

Gets or sets the location of an image to edit within the Image editor

C#
[Bindable(true)]
[ClientControlProperty]
[ClientPropertyName("serverImageUrl")]
public virtual string ImageUrl { get; set; }

Gets or sets a string containing the localization language for the RadImageEditor UI

C#
public virtual string Language { get; set; }

The Localization property specifies the strings that appear in the runtime user interface of RadImageEditor.

C#
public ImageEditorStrings Localization { get; }

Gets or sets a value indicating where the image editor will look for its .resx localization files. By default these files should be in the App_GlobalResources folder. However, if you cannot put the resource files in the default location or .resx files compilation is disabled for some reason (e.g. in a DotNetNuke environment), this property should be set to the location of the resource files.

C#
public string LocalizationPath { get; set; }
Property Value:

A relative path to the dialogs location. For example: "~/controls/RadImageEditorResources/".

If specified, the LocalizationPath property will allow you to load the image editor localization files from any location in the web application.

Gets or sets the lower limit of the zoom level. This is the lowest percentage value up to which the user can zoom out the image in the RadImageEditor.

The default is 25%.

C#
[ClientControlProperty]
[ClientPropertyName("lowerZoomBound")]
public virtual int LowerZoomBound { get; set; }

The name of the javascript function called when a command is fired on the RadImageEditor. This event is triggered when the ImageEditor's ToolBar buttons are clicked or the RadImageEditor.fire(commandName) method is invoked.

C#
[ClientControlEvent]
[ClientPropertyName("commandExecuted")]
public string OnClientCommandExecuted { get; set; }

The name of the javascript function called when a command is firing on the RadImageEditor. This event is triggered when the ImageEditor's ToolBar buttons are clicked or the RadImageEditor.fire(commandName) method is invoked. The event can be canceled.

C#
[ClientControlEvent]
[ClientPropertyName("commandExecuting")]
public string OnClientCommandExecuting { get; set; }

The name of the javascript function called when a tool widget dialog is loaded from the server.

C#
[ClientControlEvent]
[ClientPropertyName("dialogLoaded")]
public string OnClientDialogLoaded { get; set; }

The name of the javascript function called after a change is applied on the image edited.

C#
[ClientControlEvent]
[ClientPropertyName("imageChanged")]
public string OnClientImageChanged { get; set; }

The name of the javascript function called before a change is applied on the image edited. The event can be canceled.

C#
[ClientControlEvent]
[ClientPropertyName("imageChanging")]
public string OnClientImageChanging { get; set; }

The name of the javascript function called when the image in the editor loads in the browser.

C#
[ClientControlEvent]
[ClientPropertyName("imageLoad")]
public string OnClientImageLoad { get; set; }

The name of the javascript function called when the control loads in the browser.

C#
[ClientControlEvent]
[ClientPropertyName("load")]
public string OnClientLoad { get; set; }

The name of the javascript function called when the resizing on the control ends.

C#
[ClientControlEvent]
[ClientPropertyName("resizeEnd")]
public string OnClientResizeEnd { get; set; }

The name of the javascript function called when the resizing is started on the control.

C#
[ClientControlEvent]
[ClientPropertyName("resizeStart")]
public string OnClientResizeStart { get; set; }

The name of the javascript function called after the image is saved on the client or the server.

C#
[ClientControlEvent]
[ClientPropertyName("saved")]
public string OnClientSaved { get; set; }

The name of the javascript function called before the image is saved on the client or the server. The event can be canceled.

C#
[ClientControlEvent]
[ClientPropertyName("saving")]
public string OnClientSaving { get; set; }

The name of the javascript function called, when a given Keyboard ShortCut of the RadImageEditor was hit. The event can be cancelled.

C#
[ClientControlEvent]
[ClientPropertyName("shortCutHit")]
public string OnClientShortCutHit { get; set; }

The name of the javascript function called when the tool's panel dialog is closed.

C#
[ClientControlEvent]
[ClientPropertyName("toolsDialogClosed")]
public string OnClientToolsDialogClosed { get; set; }

Specifies the rendering mode of the control. Setting the mode to Lightweight will yield HTML 5/CSS 3 html and css.

C#
public override RenderMode RenderMode { get; set; }

Overrides: RadWebControl.RenderMode

Lightweight rendering mode might change the outlook of the component in some older browsers that don't support CSS3/HTML5.

Gets or sets a bool value that indicates whether RadAjaxLoadingPanel will be shown over the tools panel.

C#
public bool ShowAjaxLoadingPanel { get; set; }

Gets or sets the skin name for the control user interface.

C#
public override string Skin { get; set; }
Property Value:

A string containing the skin name for the control user interface. The default is string.Empty.

Overrides: RadWebControl.Skin

If this property is not set, the control will render using the skin named "Default". If EnableEmbeddedSkins is set to false, the control will not render skin.

Gets or sets a value that controls the behavior of the RadImageEditor's StatusBar.

C#
public StatusBarMode StatusBarMode { get; set; }
C#
protected override bool SupportsRenderingMode { get; }

Overrides: RadWebControl.SupportsRenderingMode

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: WebControl.TagKey

Gets or sets value that controls the behavior of the Toolbar. The options available are: "Default" and "Docked".

C#
[ClientControlProperty]
[ClientPropertyName("toolBarMode")]
public virtual ToolBarMode ToolBarMode { get; set; }

Gets or sets the position of the Toolbar relative to the edited content (content area).

C#
[ClientControlProperty]
[ClientPropertyName("toolBarPosition")]
public virtual ToolBarPosition ToolBarPosition { get; set; }

Tools

ImageEditorToolGroupCollection

Gets the collection containing RadImageEditor tools.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public ImageEditorToolGroupCollection Tools { get; }

Gets or sets a string containing the path to the XML toolbar configuration file.

C#
[Bindable(true)]
public string ToolsFile { get; set; }

Use "~" (tilde) as a substitution of the web-application's root directory.

You can also provide this property with an absolute URL which returns a valid XML toolbar configuration file, e.g. http://MyServer/MyApplication/Tools/MyToolsFile.aspx

The panel type to use for loading the tools dialogs' content

C#
public virtual ToolsLoadPanelTypes ToolsLoadPanelType { get; set; }

Gets or sets the maximal number of operations that will be stored in the Undo stack. Zero (0) is the default value, meaning there is no limit on the number of operations stored.

C#
[ClientControlProperty]
[ClientPropertyName("undoLimit")]
public virtual int UndoLimit { get; set; }

The collection of commands that are applied on the client, and need to be applied on the server.

C#
[Browsable(false)]
public virtual ImageOperationCollection UndoStack { get; }

Gets or sets the upper limit of the zoom level. This is the highest percentage value up to which the user can zoom in the image in the RadImageEditor.

The default is 400%.

C#
[ClientControlProperty]
[ClientPropertyName("upperZoomBound")]
public virtual int UpperZoomBound { get; set; }

Gets or sets the width of the RadImageEditor control

C#
[ClientControlProperty]
[ClientPropertyName("width")]
public override Unit Width { get; set; }

Overrides: RadWebControl.Width

Methods

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadWebControl.AddAttributesToRender(HtmlTextWriter)

Applies the IImageOperation(s) to the passed EditableImage in the order they appear in the operations collection.

C#
public EditableImage ApplyImageOperations(IEnumerable<IImageOperation> operations, EditableImage editableImage)
Parameters:operationsIEnumerable<IImageOperation>

Collection of IImageOperation(s) to apply.

editableImageEditableImage

The EditableImage to apply the operations to.

Returns:

EditableImage

The modified EditableImage object.

Applies the IImageOperation(s) to the current EditableImage in the order they appear in the operations collection.

C#
public EditableImage ApplyImageOperations(IEnumerable<IImageOperation> operations)
Parameters:operationsIEnumerable<IImageOperation>

Collection of IImageOperation(s) to apply.

Returns:

EditableImage

The modified EditableImage object.

C#
protected virtual EditableImage ApplyServerOperation(Dictionary<string, object> data)
Parameters:dataDictionary<string, object>Returns:

EditableImage

Code moved into this method from OnPreRender to make sure it executed when the framework skips OnPreRender() for some reason

C#
protected override void ControlPreRender()

Overrides: RadWebControl.ControlPreRender()

C#
protected override void CreateChildControls()

Overrides: Control.CreateChildControls()

C#
protected override void DescribeComponent(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: RadWebControl.DescribeComponent(IScriptDescriptor)

Forces the ToolsFile to be parsed and loaded at any given time.

C#
public virtual void EnsureToolsFileLoaded()

Extracts the file name from the value of the ImageUrl property.

C#
public string ExtractFileNameFromImageUrl()
Returns:

string

The file name without the extension.

C#
protected virtual string GetAppropriateToolsFilePath()
Returns:

string

C#
protected virtual ICacheImageProvider GetCacheImageProvider()
Returns:

ICacheImageProvider

Gets a reference to the Telerik.Web.UI.ImageEditor.EditableImage that is currently associated with the ImageEditor control.

C#
public EditableImage GetEditableImage()
Returns:

EditableImage

The Telerik.Web.UI.ImageEditor.EditableImage currently associated with

Gets the Type of the ICacheImageProvider used.

C#
public static Type GetICacheImageProviderType(string imageProviderTypeName)
Parameters:imageProviderTypeNamestring

The fully qualified name of the provider used.

Returns:

Type

Returns the Type of the

Gets the format of the image as a string. The format may be different from the actual filename extension.

C#
public string GetImageFormatName()
Returns:

string

The format of the image as a string

C#
protected virtual string GetToolImageUrl(string imageUrl, bool isBuiltInCommand)
Parameters:imageUrlstringisBuiltInCommandboolReturns:

string

C#
protected virtual string GetToolImageUrl(string imageUrl)
Parameters:imageUrlstringReturns:

string

Applies settings to the ImageEditor when the MetroTouch Skin is used.

C#
protected virtual void HandleMetroTouchSkin(bool isMetroTouch)
Parameters:isMetroTouchbool

Bool value indicating whether the MetroTouch Skin is used.

C#
protected static ICacheImageProvider InitCacheImageProvider(Type cacheImageProvider)
Parameters:cacheImageProviderTypeReturns:

ICacheImageProvider

C#
protected virtual void InitContentProvider()
C#
protected virtual void InitContentProvider(string selectedUrl)
Parameters:selectedUrlstring

Returns a bool value that indicates whether the command is built-in in the RadImageEditor, or is a custom one.

C#
protected virtual bool IsBuiltInCommand(string commandName)
Parameters:commandNamestring

The name of the command to check.

Returns:

bool

True - if the command is built-in; False - if the command is custom.

Loads the client state data

C#
protected override void LoadClientState(Dictionary<string, object> clientState)
Parameters:clientStateDictionary<string, object>

Overrides: RadWebControl.LoadClientState(Dictionary<string, object>)

C#
protected override void LoadControlState(object savedState)
Parameters:savedStateobject

Overrides: Control.LoadControlState(object)

C#
protected virtual void LoadToolsFile(bool loadOnlyEmptyCollections)
Parameters:loadOnlyEmptyCollectionsbool

Loads ImageEditor tools from the passed XmlDocument.

C#
public virtual void LoadToolsFile(XmlDocument doc)
Parameters:docXmlDocument

The XmlDocument from which the tools are loaded.

Restores view-state information from a previous request that was saved with the System.Web.UI.WebControls.WebControl.SaveViewState() method.

C#
protected override void LoadViewState(object state)
Parameters:stateobject

An object that represents the control state to restore.

Overrides: WebControl.LoadViewState(object)

Raises the DialogLoading event and passes the event related data.

C#
protected virtual void OnDialogLoading(string dialogName, Control panel)
Parameters:dialogNamestring

The name of the dialog that is being loaded.

panelControl

The panel to which the dialog control loaded will be added.

Raises the ImageChanged event and passes the event related data.

C#
protected virtual void OnImageChanged(EditableImage image)
Parameters:imageEditableImage

The editable image that is being modified.

Raises the ImageEditing event and passes the event related data.

C#
protected virtual void OnImageEditing(ImageEditorEditingEventArgs editingEventArgs)
Parameters:editingEventArgsImageEditorEditingEventArgs

The event arguments passed to the event handler methods.

Raises the ImageLoading event and passes the event related data.

C#
protected virtual void OnImageLoading(ImageEditorLoadingEventArgs loadingEventArgs)
Parameters:loadingEventArgsImageEditorLoadingEventArgs

The event arguments passed to the event handler methods.

Raises the ImageSaving event and passes the event related data.

C#
protected virtual void OnImageSaving(ImageEditorSavingEventArgs savingEventArgs)
Parameters:savingEventArgsImageEditorSavingEventArgs

The event arguments passed to the event handler methods.

C#
protected override void OnInit(EventArgs e)
Parameters:eEventArgs

Overrides: RadWebControl.OnInit(EventArgs)

C#
protected override void OnLoad(EventArgs e)
Parameters:eEventArgs

Overrides: Control.OnLoad(EventArgs)

Calls the event handler methods of the DialogLoading event.

C#
protected void RaiseDialogLoadingEvent(string dialogName, Control panel, object eventKey)
Parameters:dialogNamestring

The name of the dialog that is being loaded.

panelControl

The panel to which the dialog control loaded will be added.

eventKeyobject

The key used to find the event handler method handling the event.

Calls the event handler methods of the ImageChanged event.

C#
protected void RaiseImageChangedEvent(EditableImage image, object eventKey)
Parameters:imageEditableImage

The editable image that is being modified.

eventKeyobject

The key used to find the event handler method handling the event.

Calls the event handler methods of the ImageEditing event.

C#
protected void RaiseImageEditingEvent(ImageEditorEditingEventArgs editingEventArgs, object eventKey)
Parameters:editingEventArgsImageEditorEditingEventArgs

The event arguments that will be passed to the event handling methods.

eventKeyobject

The key used to find the event handler method handling the event.

Calls the event handler methods of the ImageLoading event.

C#
protected void RaiseImageLoadingEvent(ImageEditorLoadingEventArgs loadingEventArgs, object eventKey)
Parameters:loadingEventArgsImageEditorLoadingEventArgs

The event arguments that will be passed to the event handling methods.

eventKeyobject

The key used to find the event handler method handling the event.

Calls the event handler methods of the ImageSaving event.

C#
protected void RaiseImageSavingEvent(ImageEditorSavingEventArgs savingEventArgs, object eventKey)
Parameters:savingEventArgsImageEditorSavingEventArgs

The event arguments that will be passed to the event handling methods.

eventKeyobject

The key used to find the event handler method handling the event.

Registers a custom command in case it is missing as a button from the toolbar.

C#
public void RegisterCustomCommand(string commandName)
Parameters:commandNamestring

The name of the command

This method should be called before PreRender

C#
protected override void RenderChildren(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: Control.RenderChildren(HtmlTextWriter)

C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadWebControl.RenderContents(HtmlTextWriter)

Clears all the changes currently applied to the image, and restores the original image. This method should be invoked before PreRender so that the control can request the original image.

C#
public void ResetChanges()
C#
protected override object SaveControlState()
Returns:

object

Overrides: Control.SaveControlState()

Applies the current pending changes on the current RadImageEditor's EditableImage, saves the EditableImage using the ContentProvider's SaveImage method, and invokes the ImageSaving event.

This method requires AllowedSavingLocation propety of RadImageEditor to be set to "Server" or "ClientAndServer".

C#
public string SaveEditableImage(EditableImage editableImage, string imageName, bool overwrite)
Parameters:editableImageEditableImage

The EditableImage to save.

imageNamestring

The name to use if the image is saved on the FileSystem. Use string.Empty to use the existing name.

overwritebool

Bool value indicating whether the existing image in the ContentProvider should be overwritten.

Returns:

string

Returns a string message that indicates whether the saving was successful. Empty string means the saving was successful.

Applies the current pending changes on the current RadImageEditor's EditableImage, saves the EditableImage using the ContentProvider's SaveImage method, and invokes the ImageSaving event.

This method requires AllowedSavingLocation propety of RadImageEditor to be set to "Server" or "ClientAndServer".

C#
public string SaveEditableImage(string imageName, bool overwrite)
Parameters:imageNamestring

The name to use if the image is saved on the FileSystem. Use string.Empty to use the existing name.

overwritebool

Bool value indicating whether the existing image in the ContentProvider should be overwritten.

Returns:

string

Returns a string message that indicates whether the saving was successful. Empty string means the saving was successful.

Saves any state that was modified after the System.Web.UI.WebControls.Style.TrackViewState() method was invoked.

C#
protected override object SaveViewState()
Returns:

object

An object that contains the current view state of the control; otherwise, if there is no view state associated with the control, null.

Overrides: WebControl.SaveViewState()

Causes the control to track changes to its view state so they can be stored in the object's System.Web.UI.Control.ViewState property.

C#
protected override void TrackViewState()

Overrides: WebControl.TrackViewState()

Events

Fires when an operation's dialog is loading its content.

C#
public event ImageEditorDialogEventHandler DialogLoading

Fires when the image has been changed.

C#
public event ImageChangedEventHandler ImageChanged

Fires just before the image is edited on the server. It is fired only during callbacks when the user performs a server operation. Server operations include the following: Crop, AddText, InsertImage. The event can be cancelled and the image edited accordingly.

C#
public event ImageEditorEditingEventHandler ImageEditing

Fires just before the image is loaded from the file system. This event can be canceled and the edited image loaded from a custom location. The event is fired only when the ImageEditor needs to load the initial image.

C#
public event ImageEditorLoadingEventHandler ImageLoading

Fires just before the image is saved on the file system. This event can be canceled and the edited image saved into a custom location.

C#
public event ImageEditorSavingEventHandler ImageSaving
In this article
DefinitionConstructorsRadImageEditor()FieldsCanvasToolsPathDefaultHandlerUrlDefaultToolsPathFlipBothImageUrlFlipHorizontalImageUrlFlipNoneImageUrlFlipVerticalImageUrlPropertiesActiveCommandAllowedSavingLocationAlternateTextCanvasModeContentProviderCssClassFormatStringCurrentImageKeyCurrentImageUrlDescriptionUrlEditableImageSettingsEnableResizeExternalDialogsPathHeightHttpHandlerUrlImageCacheStorageLocationImageManagerImageStorageKeyImageUrlLanguageLocalizationLocalizationPathLowerZoomBoundOnClientCommandExecutedOnClientCommandExecutingOnClientDialogLoadedOnClientImageChangedOnClientImageChangingOnClientImageLoadOnClientLoadOnClientResizeEndOnClientResizeStartOnClientSavedOnClientSavingOnClientShortCutHitOnClientToolsDialogClosedRenderModeShowAjaxLoadingPanelSkinStatusBarModeSupportsRenderingModeTagKeyToolBarModeToolBarPositionToolsToolsFileToolsLoadPanelTypeUndoLimitUndoStackUpperZoomBoundWidthMethodsAddAttributesToRender(HtmlTextWriter)ApplyImageOperations(IEnumerable<IImageOperation>, EditableImage)ApplyImageOperations(IEnumerable<IImageOperation>)ApplyServerOperation(Dictionary<string, object>)ControlPreRender()CreateChildControls()DescribeComponent(IScriptDescriptor)EnsureToolsFileLoaded()ExtractFileNameFromImageUrl()GetAppropriateToolsFilePath()GetCacheImageProvider()GetEditableImage()GetICacheImageProviderType(string)GetImageFormatName()GetToolImageUrl(string, bool)GetToolImageUrl(string)HandleMetroTouchSkin(bool)InitCacheImageProvider(Type)InitContentProvider()InitContentProvider(string)IsBuiltInCommand(string)LoadClientState(Dictionary<string, object>)LoadControlState(object)LoadToolsFile(bool)LoadToolsFile(XmlDocument)LoadViewState(object)OnDialogLoading(string, Control)OnImageChanged(EditableImage)OnImageEditing(ImageEditorEditingEventArgs)OnImageLoading(ImageEditorLoadingEventArgs)OnImageSaving(ImageEditorSavingEventArgs)OnInit(EventArgs)OnLoad(EventArgs)RaiseDialogLoadingEvent(string, Control, object)RaiseImageChangedEvent(EditableImage, object)RaiseImageEditingEvent(ImageEditorEditingEventArgs, object)RaiseImageLoadingEvent(ImageEditorLoadingEventArgs, object)RaiseImageSavingEvent(ImageEditorSavingEventArgs, object)RegisterCustomCommand(string)RenderChildren(HtmlTextWriter)RenderContents(HtmlTextWriter)ResetChanges()SaveControlState()SaveEditableImage(EditableImage, string, bool)SaveEditableImage(string, bool)SaveViewState()TrackViewState()EventsDialogLoadingImageChangedImageEditingImageLoadingImageSaving
Not finding the help you need?
Contact Support