The Legend control allows you to display a description and corresponding symbol as an explanatory key for a Map.


The following tables list the members exposed by Legend.

Public Constructors

  Name Description
Public method Legend Initializes a new instance of the Legend class.
Top

Public Properties

  Name Description
Public property AutoSize Gets or sets a value indicating whether the control is automatically resized to display its entire contents.
Public property BackColor Overridden. Gets or sets the background color of the Legend.
Public property Count Returns the number of items in the Legend.
Public property Height Overridden. Gets or sets the height of the control.
Public property IconHeight Gets or sets the height of symbol icons in pixels.
Public property IconWidth Gets or sets the width of symbol icons in pixels.
Public property Image Returns the binary data for the legend image.
Public property ImageFormat Specifies the format of the legend image.
Public property ImagePriority Specifies the priority of the legend image when it is stored in the ASP.NET Cache (by default).
Public property ImageQuality Specifies the quality of the JPEG image to be saved.
Public property ImageTempDirectory Specifies the temporary virtual directory to store image files in.
Public property ImageTimeout Gets and sets the time-out period (in minutes) that specifies how long to keep the legend image in a Cache or temporary directory.
Public property Item Returns a specific item of the Legend, by ordinal index (zero-based).
Public property LegendFont Gets or sets the font of the Legend.
Public property Width Overridden. Gets or sets the width of the control.
Top

Public Methods

  Name Description
Public method Add Overloaded. Adds an item to the Legend.
Public method CalculateSize Calculates preferred width and height of the Legend.
Public method Insert Inserts an item at a specified index in a Legend object.
Public method Populate The Populate method populates the Legend with data for all visible layers and feature classes contained in a Map.
Public method SaveImage Saves the legend image to the specified file in a format specified by the ImageFormat property.
Top

See Also