EWSoftware Image Map Controls


Image Map Features

The EWSoftware Image Map Controls allow you to define hot spots on an image and perform an action when a defined area is clicked. The current version supports .NET 2.0 through .NET 3.5. A Windows Forms and a web server image map control are included. Each contains a similar core set of features:
  • All of the standard image types are supported (BMP, JPEG, GIF, etc).
  • Support for animation is included for those image types that use it such as GIF.
  • The image's display height and width can be customized.
  • Image areas can be defined using rectangles, circles, or polygons of any shape defined by a set of points.
  • Tab order and validation events are supported.
  • Image areas can be triggered by clicking on them with the mouse or by tabbing to them and hitting the Enter key.
  • Image areas support a Tag property so that you can associate user-defined information with each image area.
  • Both provide full design-time support including a graphical image area selection tool that saves you from having to manually determine and type in the area coordinates.

Web Server Image Map Control

The web server image map control renders a client-side image map that supports all of the expected features including:
  • Tooltip (alternate) text for each image area.
  • An access key to select an image area by pressing ALT plus the defined access key.
  • Image areas can be enabled or disabled.
  • The action can be set to navigate to a URL (the default), post back to the server to fire a Click event, or to do nothing and just display a tool tip if one is specified.
  • When set to navigate, the target window can be defined to open the URL in a new or existing browser window.
  • The navigate action can be used to execute client-side script.
  • When set to post back, the event handler receives the index of the clicked area and the coordinates of the click if supported.

In addition, custom attributes are supported to define additional behavior such as onmouseover events, etc. The image map and its areas also support view state so changes made to the controls across post backs are retained.

The standard image map control supplied with ASP.NET 2.0 lacks many of the features listed above and also lacks the superior design-time support found in the EWSoftware.ImageMaps control. The web server image map control has been tested in Internet Explorer 6.0, Firefox 1.5, and Netscape 8.1. It also works well in earlier versions of those browsers and should work well in any other browser that provides support for client-side image maps.

Windows Forms Image Map Control

The Windows Forms image map control provides a similar control for rich client applications. It displays the selected image within its bounds and provides the following features:
  • Scrolling is supported for displaying images larger than the bounds of the control.
  • For images smaller than the control, it can be set to center the image within itself or shrink its bounds to fit the image.
  • Tooltip text for each image area.
  • An access key to select an image area by pressing ALT plus the defined access key.
  • Tab indexes can be defined for image areas so that the control participates in the tab order of its parent.
  • Image areas can be enabled or disabled.
  • The action can be set to fire a Click event or to do nothing and just display a tool tip if one is specified.
  • When set to fire the Click event, the event handler receives the index of the clicked area and the coordinates of the click.
  • The control uses double-buffering for a smooth, flicker-free display.
  • The Windows Forms control provides an additional ImageAreaEllipse image area to make it easy to define elliptical image areas.
  • The image map and image areas support owner draw mode to allow you to totally customize the display of the image map or individual image areas. Image areas can be set to owner draw mode even if the image map itself is not.
  • You can define event handlers on the image map to provide generic handling of mouse and focus events for all image areas. In addition, the image map will forward all mouse and focus events to the image areas so that you can handle the events individually by connecting the appropriate event handlers to the image areas themselves.

Demonstration Applications and Help File

The controls come with a Windows Forms and an ASP.NET web application that demonstrate each of the controls. Versions of the demos are provided in both C# and VB.NET. A help file is also provided that fully documents all classes, properties, methods, and events contained within the EWSoftware.ImageMaps namespaces.

Screen Shots

Click the images for a larger view.

Click for larger image      Click for larger image
Click for larger image

The first image shows the Image Area Collection Editor that is used to define image areas. The second image shows the Coordinate Editor dialog used to interactively define the image area on the image itself. Options are provided to move and resize the image area.

The last image is a screenshot of the Windows Forms control demo. This form demonstrates the owner draw and event handling abilities of the image map and the image areas. The only control on the form is the ImageMap control. The background gradient fill is drawn by the image map's owner draw event handler. All other items seen are owner drawn image areas. The triangle (a polygon area) in the middle has the focus. The Properties "button" (an ellipse area) shows an example of hotlighting (the dark blue glow) with the mouse over a non-focused owner drawn image area.

Download the Shareware Version

The shareware version of the EWSoftware ImageMap Controls can be downloaded here:

NOTE: The shareware web server control renders a small link to this page next to each image map. The shareware Windows Forms control watermarks the top left of the image with a reference to this page. These do not appear in the licensed version.

The supplied demo projects are Visual Studio 2005 projects but can be opened and converted to Visual Studio 2008 projects without any problems.

New Feature Requests

The components in this library provide an extensive set of features. However, everyone has different needs, some of which might not have been anticipated. If you find that these controls are missing features that you need, please feel free to make a request to have them added. Every effort will be made to work them into a future release.

Live Demo

For a live demo of the web server control, click here. This is the same demo included in the download above. The download also contains a compiled version of the Windows Forms demo application.

Purchase a Licensed Version

A single user license or a site license can be purchased. The single user license is for a single developer on a single PC. The site license is for any number of developers at a single location. The licensed version contains fully commented C# source code for both the Windows Forms and the web server image map controls and their supporting classes. Technical support and bug fixes will be supplied to licensed users free of charge. Once purchased, distribution of the assembly containing the controls with your applications is royalty-free (see the enclosed license agreement for full details).

Payment and Delivery

For fastest delivery, please choose a payment option below. Payment is handled via PayPal and you will be e-mailed a URL within two (2) business days that allows you to download the licensed version from this site. If you would prefer to pay by an alternate method such as check or money order, please contact the author directly at Eric@EWoodruff.us. Thank you!

NOTE: The download URL will be sent to the e-mail address on the PayPal invoice. If you would like it sent to an alternate e-mail address, please e-mail a note containing the alternate e-mail address at the same time payment is made.

New License
 
Upgrade from Version 1.x to 2.x

New Single User License
$35.00 per user


New Site License
$175.00 per location

 
Single User License Upgrade From Prior Version
$18.00 per user


Site License Upgrade from Prior Version
$88.00 per location

Revision History

12/22/2006 2.0.0.0 - Created a .NET 2.0 version of the controls. Due to some issues with the Visual Studio 2005 designers, the web controls and Windows Forms controls now each reside in a separate assembly. Changes were also made in the .NET 2.0 version to take advantage of some of the new features in .NET 2.0:
  • The DrawImageEventHandler delegate has been removed. Use the new generic EventHandler<DrawImageEventArgs> delegate instead.
  • The ImageMapClickEventHandler delegate has been removed. Use the new generic EventHandler<ImageMapClickEventArgs> delegate instead.
  • The base class for ImageAreaCollection has been changed to Collection<IImageArea>.
  • The base class for PointCollection has been changed to Collection<Point>.
11/28/2005 1.4.0.0 - Fixed up the web server image map control's use of view state to handle dynamic image areas correctly. The demo has been updated to include an example of using a dynamically created image area.

12/31/2004 1.3.0.0 - Made significant improvements to the Windows Forms Image Map control and the Coordinate Editor. See the help file for full details.

12/18/2004 1.2.0.0 - Fixed a bug in the use of custom attributes in the web control (i.e. onmouseover and onmouseout handlers on image areas). The web demos have been updated to include an example of their use.

NOTE: If you use the Visual Studio designer to edit the collection of image areas, custom attributes on the image area items will be lost (i.e. things like onmouseover or other such attributes that are not normal properties of the image area object). This appears to be a bug in the designer as the same thing happens to ListItem objects in controls such as the ListBox and DropDownList. Use code to add custom attributes to the image areas instead as show in the demo.

10/30/2004 1.1.0.0 - Added a TagString property to the Web Image Area controls so that the tag value could be set in the design-time HTML. ASP.NET is unable to convert a value to an Object at runtime if assigned to the Tag property in the design-time HTML. As such, use the TagString property instead. The Tag property can be used in code to assign values of any type to the tag value.

The default behavior of throwing an exception if the page's form control cannot be found when post back image areas are used has been changed. If not found, it now defaults to using element zero of the forms collection (forms[0]). If you need to override this behavior and specify an actual form ID, use the new FormId property on the first image map control that appears on the page.

Added culture awareness where needed to the conversion to/from string values.

07/26/2004 1.0.0.0 - Initial release.


   
Updated Thursday, March 11, 2010 Copyright © 1998-2010 Eric Woodruff, All rights reserved
Send mail to Eric@EWoodruff.us