View/Edit attributes pages

This section explains how to customize and extend the view attributes pages and edit attributes pages.

Windows Application Framework exposes several classes to aid in the retrieval and management of records/rows stored in a feature layer. Conceptually, there are two entities: feature and feature attribute. A feature represents a single record/row stored in a feature layer and is implemented by the Feature class. A feature attribute represents some property (or attribute) about a given feature and is implemented by the FeatureAttribute (abstract) class. The DataColumnFeatureAttribute class represents a single column in a feature data row, and PictureFeatureAttribute, which derives from DataColumnFeatureAttribute, represents a feature data row column whose data type is an image.

Need alt text

Feature attribute controls

The ArcGIS Mobile for Windows application uses two different controls to display and edit a feature's attributes: ViewFeatureAttributesControl and EditFeatureAttributesPage.

Need alt text

Both controls are used by first setting the Feature property, which will create and populate the Attributes collection. It is the feature attributes in the Attributes collection that are displayed in the control. The Attributes collection is a public observable collection that may be modified by developers. This means that developers can (1) remove attributes from the collection, preventing them from being displayed to the user, and (2) add attributes to the collection.

Both controls provide two events for developers to listen to when a new collection of feature attributes is being created (in other words, when the Feature property has changed). The first event, CreatingFeatureAttributes, is an instance event that allows a developer to listen to a specific instance of that control. The second event, ControlCreatingFeatureAttributes, is a static event that is raised when any instance of that control class creates a new collection of feature attributes. This static event allows a developer to listen to and customize all instances of that type of control.

It is in response to these events that developers can modify the collection of feature attributes.


9/20/2011