ESRI.ArcGIS.ADF.IMS
Units Property
See Also  Example
ESRI.ArcGIS.ADF.IMS.Display.AcetateElement Namespace > AcetateElement Class : Units Property




Gets or sets the AcetateUnits for this element.

Syntax

Visual Basic (Declaration) 
Public Property Units As AcetateUnits
Visual Basic (Usage)Copy Code
Dim instance As AcetateElement
Dim value As AcetateUnits
 
instance.Units = value
 
value = instance.Units
C# 
public AcetateUnits Units {get; set;}

Example

This sample creates an acetate element with units, and adds the element to the map
C#Copy Code
// Create point for acetate graphic location 

Point arrowLocation = new Point(30, imgMap.Height.Value - 30); 

  

// Create NorthArrow element, with pixel units 

NorthArrow northArrow = new NorthArrow(24, arrowLocation, AcetateUnits.Pixel); 

  

// Add element to acetate layer and to MapView 

AcetateLayer acetateLayer = new AcetateLayer("mapGraphics"); 

acetateLayer.AcetateElements.Add(northArrow); 

mapView.Layers.Add(acetateLayer); 

    
Visual BasicCopy Code
' Create point for acetate graphic location

Dim arrowLocation As New Point(30, imgMap.Height.Value - 30)



' Create NorthArrow element, with pixel units

Dim northArrow As New NorthArrow(24, arrowLocation, AcetateUnits.Pixel)



' Add element to acetate layer and to MapView

Dim acetateLayer As New AcetateLayer("mapGraphics")

acetateLayer.AcetateElements.Add(northArrow)

mapView.Layers.Add(acetateLayer)

Remarks

Determines how the location of the acetate element is interpreted by the server. Elements can be placed using either real-world coordinates (Database) or image pixels (Pixel).

See Also

© 2010 All Rights Reserved.