DockExtender control


In this topic


About the DockExtender control

The DockExtender control positions controls to a specific location on top of a Map control. DockExtender builds on the ExtenderControlBase class included with the ASP.NET Asynchronous JavaScript and XML (AJAX) Control Toolkit. For more information, see Microsoft ASP.NET Web site's topic, ASP.NET AJAX Control Toolkit
Frequently, OverviewMap, Navigation, ZoomLevel, and ScaleBar controls are placed on top of a Map control to enhance the interface of an application. 
Use the DockExtender control to define the position of a control relative to the map, instead of manually positioning the control over the map.

Using the control

Do the following to use the DockExtender control:
  1. To add controls to the page, the DockExtender control requires a ScriptManager on the page to function. Add a ScriptManager as the first control on the page.
  2. Add a DockExtender, MapResourceManager, and a Map control to the page. 
  3. Add a valid map resource item to the MapResourceManager and buddy it with the Map control. 
  4. Add a control to dock within the map. In this example, an OverviewMap control will be used. 
  5. Add an OverviewMap control to the page and set the map and map resource item: See the following screen shot:
        
  1. To set the DockExtender control properties, select the DockExtender control. Do the following on the Properties page:
    1. Set the DockControlID property to the ID of the Map control previously added. This property defines the control in which to dock another control and can only be associated with a Web Application Developer Framework (ADF) Map control.  
    2. Set the TargetContrlID property to the control you want to dock on the map. Use the ID of the OverviewMap control previously added.    
    3. Set the Alignment property to position the target control (OverviewMap) within the dock control (map). Nine options are available to describe the corners, sides, and center of the dock control.   
    4. Optional—Set the OverviewMap's BorderColor property to black and BorderStyle property to solid. This enables you to discern between the Map and docked OverviewMap control. 
  2. At runtime, the target control (OverviewMap) is positioned and shows on top of the Map control. The position of the target control at design-time is not important since the DockExtender control determines its location at runtime. In this example, the Alignment property of the DockExtender control is set to TopRight. See the following illustration:


     

Members

The following table shows a list of properties related to the DockExtender control. For more reference information, see the DockExtender control in the library reference section.
Property name
Type
Description
Alignment
ContentAlignment
Position of the docked control on the map.
DockControlID
string
ID of a Map control in which another control will be docked.
TargetControlID
string
ID of the control to dock on a Map control.


See Also:

Web ADF controls
Customizing the Web Mapping application




To use the code in this topic, reference the following assemblies in your Visual Studio project. In the code files, you will need using (C#) or Imports (VB .NET) directives for the corresponding namespaces (given in parenthesis below if different from the assembly name):
  • ESRI.ArcGIS.ADF.UI.WebControls.dll