Assembly: ESRI.ArcGISExplorer.Application (in ESRI.ArcGISExplorer.Application.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public class DockWindow : UserControl |
Visual Basic (Declaration) |
---|
Public Class DockWindow _ Inherits UserControl |
Remarks
The DockWindow class provides a flexible extension point in ArcGIS Explorer. A class which inherits from the DockWindow class can be shown as a dockable window in the ArcGIS Explorer application, providing an opportunity to present a custom user interface to the user, and run code when the user interacts with this interface.
Other extension points are Button, Gallery, CheckBox, ComboBox and Extension.
The simplest way to create a new DockWindow is to use the templates provided in the Visual Studio Tools for ArcGIS Explorer. For step by step instructions on creating a new DockWindow using these templates, see the Creating a custom DockWindow walkthrough.
When a DockWindow is implemented, ArcGIS Explorer will show a Button on the Ribbon which will open the DockWindow; no additional code is required to achieve this. Many simple DockWindow implmentations do not need to override any of the methods available in order to function; however, the following methods can optionally be overriden if required;
- OnActivate - called when the dockable window gains focus.
- OnDeactivate - called when the dockable window loses focus but is still available.
- OnHide - called when the dockable window is closed.
- OnShow - called when the dockable window is opened.
By default, a new DockWindow is not visible in the application, and must be shown by clicking the corresponding button on the Ribbon. Note that the Button shown for a DockWindow on the Ribbon will use the same caption as shown in the titlebar of the DockWindow itself. The icon shown on the Button is specified in the AddIns.xml file and can be set when the class is created using the templates and wizards.
The DockWindow class inherits from the UserControl class, part of the System.Windows.Forms namespace, and therefore any add-in using a DockWindow requires a reference to the System.Windows.Forms.dll assembly. Many of the inherited properties of UserControl will be ignored as the DockWindow is hosted inside another window in ArcGIS Explorer; for example, the BorderStyle and Dock properties will be overridden by the hosting control.
Note: |
---|
A DockWindow must be included in an add-in project and described in the AddIns.xml file which is part of that project in order to be loaded by ArcGIS Explorer. These steps are automated if the DockWindow is created by using the Visual Studio Tools for ArcGIS Explorer templates. |
Many of the samples included in this SDK provide DockWindow examples, for example the GeoNames, Layer Attributes, Map Content Updates, and Update Note Geometry samples.
Inheritance Hierarchy
System..::.MarshalByRefObject
System.ComponentModel..::.Component
System.Windows.Forms..::.Control
System.Windows.Forms..::.ScrollableControl
System.Windows.Forms..::.ContainerControl
System.Windows.Forms..::.UserControl
ESRI.ArcGISExplorer.Application..::.DockWindow