Windows Dev Center

FileActivatedEventArgs.NeighboringFilesQuery property

Gets the neighboring files of the files for which the app was activated.

Syntax


public StorageFileQueryResult NeighboringFilesQuery { get; }

Property value

Type: StorageFileQueryResult

The StorageFile objects that represent the neighboring files of the files being passed to the app.

Remarks

Apps that activate to handle file associations get an object that represents the invoked file only. This can be a problem for media gallery apps in which users expect to navigate to neighboring files. Use the NeighboringFilesQuery property to get the collection of the files in the surrounding view, which is the collection that the invoked file was selected from.

Your apps need to declare a library capability to get items of the corresponding type. To get pictures in the NeighboringFilesQuery, you need the Pictures library capability, and to get music files, you need the Music library capability.

The NeighboringFilesQuery property is available only when a single file is invoked. If the size of the Files collection is more than 1, the value of NeighboringFilesQuery is null. Also, the query is not always available for all invocations, so you can use it only if present.

Requirements (device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.ApplicationModel.Activation
Windows::ApplicationModel::Activation [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (operating system)

Minimum supported client

Windows 8.1

Minimum supported server

Windows Server 2012 R2

Minimum supported phone

None supported

Namespace

Windows.ApplicationModel.Activation
Windows::ApplicationModel::Activation [C++]

Metadata

Windows.winmd

See also

FileActivatedEventArgs

 

 

Show:
© 2015 Microsoft