Overview of Windows Application framework

To help you get started, this section provides you an with an overview of the Windows Application framework, specifically, how the Windows application is architected, its major components, and how they are related to each other.

Before getting into the details about the Windows Application framework, it is worth pointing out that both the ready-to-deploy Windows application and Windows Mobile application are built based on the core ArcGIS Mobile SDK, and we have tried to make the architectures of these two application frameworks and their development experience as similar as possible. However, there are still some differences between them because the Windows application is built with Windows Presentation Foundation (WPF), and the mobile application is a WinForms application. The differences will be addressed below and in other sections.

Architecture

The Windows Application framework exposes a set of classes for accessing various function areas inside the ArcGIS Mobile for Windows Application. The diagram below shows these key classes and the relationships between them at a coarse-grained level. The application class, MobileApplication, contains mobile project, application settings and settings pages, Map control, application global menu, GPS manager, GPS menu, and so on. A mobile project consists of one or more tasks and extensions. Tasks and extensions could be part of the application as global tasks and extensions, which exist for all projects, or part of a project.

As mentioned earlier, ArcGIS Mobile application is a task-driven or workflow-driven application. Each task or extension has one or more pages for its workflow. From each page, you have access to the navigation bar which contains a page menu and navigation buttons.

Note: The Windows Application framework is available in ESRI.ArcGIS.Mobile.Client.dll in the bin folder of your mobile installation.

This is required but not for a PDF file

MobileApplication

Within the application framework, the MobileApplication class represents the ready-to-deploy Windows application. It is the primary hook into the mobile application; you can access its exposed properties, member variables, and functions via its static instance Current when the application is running.

One task or project extension may involve one or more pages to fulfill its workflow. For example, in the Collect Features task, the application guides you through a series of pages, including the select feature type page, collect method page, collect geometry page, collect attributes pages, and so on. To navigate users from one page to another, the MobileApplication class provides a Transition() method to close the current page and load the new page. The current page can be accessed from the CurrentPage property.

This is required

Task and ProjectExtension

The ArcGIS Mobile for Windows Application has six built-in tasks:

All these task classes are derived from the Task class, which is, in turn, derived from the Project Extension class. Technically, Task is a special type of ProjectExtension, while a task is listed in the navigation bar menu on the View Map page; a project extension typically is used to customize or extend the application or existing tasks. The Windows application includes two built-in project extensions—FieldCrewLoggingExtension and SignInExtension—which are used together with the ViewFieldCrewTask.

A Task has a Name, Description, Note, and an ImageSource for its icon. Notice that the way to specify a task icon is different in Windows Application framework and Mobile Application framework. Refer to the samples and assembly reference for details. The task class has an Execute() function. It is called when the task button is tapped from the task list page and starts the task workflow.

To customize an existing task, you can customize the pages in its workflow, for example, add a MenuItem to the navigation bar page menu; or you can insert a function or page at extensible points during its workflow, for example, add a geometry validation function after the feature collection is finished. Please refer to the next section, "Using Windows Application framework" for more details about these extensible points in existing tasks.

This is required

MobileApplicationPage

MobileApplicationPage is an important class in the Windows application, since all pages are derived from it; MobileApplicationPageMobileApplicationPage is a WPF user control that defines the page title, note, icon on the title bar, the menu and buttons on the navigation bar, and the window content between the title bar and navigation bar.

In the middle of the navigation bar is the page menu, which could be accessed from the MenuItems property to add or remove an item to or from the menu. You may notice that MenuItems is a collection of Object, instead of a MenuItem, this is because with a WPF, you have the flexibility to add different controls other than just a standard MenuItemMenuItem. Refer to the "Using Windows Application Frame > Menus" section for more details.

The buttons on the navigation bar are for navigating from the current page to another. BackCommand is a PageNavigationCommand associated to the back or cancel button on the left end of the navigation bar. When the back or cancel button is invoked, the application transits to the PreviousPage. With the BackCommands collection, you could add more buttons to the left of the page menu, or use the OkCommand and ForwardCommandsto add buttons to the right of the page menu.

The application provides a help page for each page; HelpSource property defines a Uri pointing to the HTML help page which is located under the <installdir>\ArcGIS\Mobile10.0\Help\ContextHelp\ArcGISMobile folder.

Notice that MobileApplicationPage is comparable to Page in Mobile Application framework. The former is a WPF control; the later is a Winform.

This is required

Development and deployment of Task or ProjectExtension

A task or project extension assembly is essentially a .NET class library. This assembly is loaded when the application opens a project that contains this task or project extension. To develop a task or project extension assembly, you could start with a class library project within Visual Studio, or use ArcGIS Mobile project or item templates. Refer to the walk-through tutorials for more details.

To have the Windows application load your tasks or project extension when you open a project, you need to deploy the extension assembly DLL to the Windows application bin folder or the application Extensions folder, and add the references to your tasks or project extensions into the mobile project AMP file. refer to the "Deploying extensions" section for more details.

For more samples and up-to-date documents, see Mobile GIS Resource Center.


9/20/2011