Customizing attributes page for viewing and editing

Application framework provides ViewAttributesPage and EditAttributesDialog specifically for attribute viewing and editing, respectively. Both are designed to take a feature and create different groups for displaying attributes.

Both of them use the concept of a group to organize information for each column from Feature. If there is more information than can be displayed on one page, it will provide a scroll bar on the side. Also note that you can always use arrow keys or the rocker to browse from one column to the other.

The following screen capture shows default groups created by ViewAttributesPage and EditAttributesDialog based on a feature they take.

need alt text

Need alt text

Additionally, the Edit Attributes page provides native support for attribute editing. You can activate a group by tapping the small arrow on its right side. Depending on column type and domain/subtype settings, it will automatically navigate to a new data entry page and take you back to the Edit Attributes page after accepting/abandoning edits.

Customizing ViewAttributesPage/EditAttributesDialog

Technically, you can create your own page for attribute viewing or editing; however, Esri encourages you to use the built-in View Attributes page and Edit Attributes page when necessary. You can also customize them to fit your needs.

To customize the View Attributes page, listen to ViewAttributesPage.CreatingViewGroups. This event is fired when the groups are being created on the page. Each group typically contains two text items, one for header (the name of the column) and the other for the value of the column. You can add, remove, or modify the group if need be. For example, you might want to put a button in a group that represents a BLOB column that stores audio and starts playing the audio when tapped.

Similar to ViewAttributesPage, EditAttributesDialog fires a CreatingEditGroups event when groups are being constructed on the page. You can customize groups to your needs by signing up to this event. For the same example as mentioned above, you can navigate to a new page, allowing recording of new audio when the BLOB group is activated.

The screen capture below shows navigation to a page where you can record audio and save it in a BLOB field. For more details, see the AttributesExtension sample.

need alt text

need alt text


9/20/2011