Represents a popup window in the ArcGIS Explorer application.

Namespace:  ESRI.ArcGISExplorer.Mapping

Assembly:  ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)

Syntax

C#
public sealed class Popup
Visual Basic (Declaration)
Public NotInheritable Class Popup

Remarks

This class allows you to programmatically show, hide and alter the properties of popup windows within the ArcGIS Explorer application.

There are two types of popup window:

  • A MapItem Popup is implicitly instantiated whenever you create a MapItem that exposes a Popup property, for example a Note or View.
  • A Temporary Popup is explicitly instantiated using the Popup constructors; this type of Popup is not linked to a MapItem instance.

Popup windows rely on an instance of MapDisplay, so you must either specify a MapDisplay on instantiation, or you must add the associated MapItem to the Map before you can activate the window.

It is possible to change the title, size and content for an existing popup window using the properties of this class. Although the content property is a string, you can populate it with HTML or XML and the content will display in the popup window as though you are viewing markup in a web browser. The application automatically detects if the content contains valid markup, and if not, simply displays the specified string.

Certain types of popup window have content that cannot be modified, for example KmlNode popup content is driven by the underlying data. You can use the IsReadOnly property to determine if the popup content can be set.

The application dictates that there is only ever a single active window (a window that is visible and has focus). If a second window is activated, the previously active window is hidden. Application users can use the pin at the top right of the window to ensure that it remains visible if a second popup is activated.

In order to display a popup window, use the Activate method. Activate wraps up several functions- shows the popup window and gives it focus, and hides any other unpinned popups that are currently visible. The Hide method simply hides a single popup regardless of its pinned state. You can use the MapDisplay.HidePopups convenience method to hide multiple popups associated with a particular MapDisplay.

If the popup window is associated with a specific target location on the map, you can specify this location when instantiating a popup. When the window is activated, a leader line will be drawn from the window to the specified location. You can use the SetTarget method to update the leader line for an existing window.

You cannot use SetTarget when working MapItem popup windows; commonly the MapItem will define the target location. For example, a Note popup window will always target the geometry of the Note so that if a Note moves to a new location, the leader line will follow.

Inheritance Hierarchy

System..::.Object

  ESRI.ArcGISExplorer.Mapping..::.Popup

See Also