ArcGIS Runtime SDK for WPF - Library Reference
AppDataPath Property
See Also 
ESRI.ArcGIS.Client Namespace > ArcGISRuntime Class : AppDataPath Property

Gets or sets the application data path for the runtime deployment used by this application.

Syntax

Visual Basic (Declaration) 
Public Shared Property AppDataPath As String
C# 
public static string AppDataPath {get; set;}

Remarks

The folder specified by this property will contain data created by the runtime deployment which should be persisted between application sessions. The runtime deployment will write all application-related data to the folder specified by this property for the lifetime of the application. The property must be set each time your application starts but before the Initialize method is called. Once the runtime deployment is initialized any attempt to set this property will result in an Exception.

Any Map Packages (.MPK), Address Locator Packages (.GCPK) or Geoprocessing Packages (.GPK) used by your application in conjunction with the runtime local server are unpacked to this location. You should therefore consider how much space may be required by this folder when setting the property. Packages will be unpacked to "{AppDataPath}\Documents\ArcGIS\Packages". Other data written to the folder specified by this property can be considered internal to the runtime deployment and typically does not require significant disk space.

The default value for the AppDataPath property is:

  • "C:\Users\{UserName}\AppData\Local\ArcGISRuntime" (Windows 7, Windows Vista and Windows Server 2008).
  • "C:\Documents and Settings\{UserName}\Local Settings\Application Data\ArcGISRuntime" (Windows XP and Windows Server 2003).
The default location will be shared by any other runtime deployment on the local machine which also uses the default location. It is therefore recommended that this property be set in order to differentiate the application data from that created by another runtime deployment.

This property, in conjunction with the TempPath property enable you to have control over any application-related or temporary data created by the runtime deployment during use by your application and can help achieve a zero footprint implementation in which no files are left behind when the application is removed from or uninstalled from the deployment machine.

Property Value

A System.String representing the path to a folder on disk.

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.