PhotoImportSession PhotoImportSession PhotoImportSession PhotoImportSession Class

Definition

Represents a photo import session with a photo import source.

public : sealed class PhotoImportSession : IClosable, IPhotoImportSession, IPhotoImportSession2public sealed class PhotoImportSession : IDisposable, IPhotoImportSession, IPhotoImportSession2Public NotInheritable Class PhotoImportSession Implements IDisposable, IPhotoImportSession, IPhotoImportSession2// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

Get an instance of this class by accessing the PhotoImportOperation.Session property or by calling PhotoImportSource.CreateImportSession.

For how-to guidance for adding media import to your app, see Import media from a device.

Properties

AppendSessionDateToDestinationFolder AppendSessionDateToDestinationFolder AppendSessionDateToDestinationFolder AppendSessionDateToDestinationFolder

Gets or sets a value specifying whether the session date should be appended to the destination folder name.

public : PlatForm::Boolean AppendSessionDateToDestinationFolder { get; set; }public bool AppendSessionDateToDestinationFolder { get; set; }Public ReadWrite Property AppendSessionDateToDestinationFolder As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True if the session date should be appended to the folder name; otherwise, false.

DestinationFileNamePrefix DestinationFileNamePrefix DestinationFileNamePrefix DestinationFileNamePrefix

Gets or sets the prefix for the destination file name.

public : PlatForm::String DestinationFileNamePrefix { get; set; }public string DestinationFileNamePrefix { get; set; }Public ReadWrite Property DestinationFileNamePrefix As string// You can use this property in JavaScript.
Value
PlatForm::String string string string

The prefix for the destination file name.

DestinationFolder DestinationFolder DestinationFolder DestinationFolder

Gets or sets the destination folder for the photo import session.

public : IStorageFolder DestinationFolder { get; set; }public IStorageFolder DestinationFolder { get; set; }Public ReadWrite Property DestinationFolder As IStorageFolder// You can use this property in JavaScript.
Value
IStorageFolder IStorageFolder IStorageFolder IStorageFolder

The destination folder for the photo import session.

RememberDeselectedItems RememberDeselectedItems RememberDeselectedItems RememberDeselectedItems

Gets a value indicating whether the deselected items for the session should be remembered.

public : PlatForm::Boolean RememberDeselectedItems { get; set; }public bool RememberDeselectedItems { get; set; }Public ReadWrite Property RememberDeselectedItems As bool// You can use this property in JavaScript.
Value
PlatForm::Boolean bool bool bool

True if the deselected items for the session should be remembered; otherwise, false.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

SessionId SessionId SessionId SessionId

Gets a unique identifier for the import session.

public : PlatForm::Guid SessionId { get; }public Guid SessionId { get; }Public ReadOnly Property SessionId As Guid// You can use this property in JavaScript.
Value
PlatForm::Guid Guid Guid Guid

A unique identifier for the import session.

Source Source Source Source

Gets an object representing the source device associated with the photo import session.

public : PhotoImportSource Source { get; }public PhotoImportSource Source { get; }Public ReadOnly Property Source As PhotoImportSource// You can use this property in JavaScript.
Value
PhotoImportSource PhotoImportSource PhotoImportSource PhotoImportSource

An object representing the source device associated with the photo import session.

SubfolderCreationMode SubfolderCreationMode SubfolderCreationMode SubfolderCreationMode

Gets or sets a value indicating the method used for naming subfolders within the destination folder.

public : PhotoImportSubfolderCreationMode SubfolderCreationMode { get; set; }public PhotoImportSubfolderCreationMode SubfolderCreationMode { get; set; }Public ReadWrite Property SubfolderCreationMode As PhotoImportSubfolderCreationMode// You can use this property in JavaScript.
Value
PhotoImportSubfolderCreationMode PhotoImportSubfolderCreationMode PhotoImportSubfolderCreationMode PhotoImportSubfolderCreationMode

A value indicating method used for naming subfolders within the destination folder.

SubfolderDateFormat SubfolderDateFormat SubfolderDateFormat SubfolderDateFormat

Gets or sets a value indicating the date format used by the session for subfolders.

public : PhotoImportSubfolderDateFormat SubfolderDateFormat { get; set; }public PhotoImportSubfolderDateFormat SubfolderDateFormat { get; set; }Public ReadWrite Property SubfolderDateFormat As PhotoImportSubfolderDateFormat// You can use this property in JavaScript.
Value
PhotoImportSubfolderDateFormat PhotoImportSubfolderDateFormat PhotoImportSubfolderDateFormat PhotoImportSubfolderDateFormat

A value indicating the date format used by the session for subfolders.

Additional features and requirements
Device family
Windows 10 Anniversary Edition (introduced v10.0.14393.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v3)

Methods

Close() Close() Close() Close()

Closes the photo import session and releases associated resources.

public : void Close()This member is not implemented in C#This member is not implemented in VB.Net// You can use this method in JavaScript.

Dispose() Dispose() Dispose() Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

This member is not implemented in C++void Dispose()Sub Disposevoid Dispose()

FindItemsAsync(PhotoImportContentTypeFilter, PhotoImportItemSelectionMode) FindItemsAsync(PhotoImportContentTypeFilter, PhotoImportItemSelectionMode) FindItemsAsync(PhotoImportContentTypeFilter, PhotoImportItemSelectionMode) FindItemsAsync(PhotoImportContentTypeFilter, PhotoImportItemSelectionMode)

Asynchronously finds items on the source device that are available for import.

public : IAsyncOperationWithProgress<PhotoImportFindItemsResult, unsigned int> FindItemsAsync(PhotoImportContentTypeFilter contentTypeFilter, PhotoImportItemSelectionMode itemSelectionMode)public IAsyncOperationWithProgress<PhotoImportFindItemsResult, uint> FindItemsAsync(PhotoImportContentTypeFilter contentTypeFilter, PhotoImportItemSelectionMode itemSelectionMode)Public Function FindItemsAsync(contentTypeFilter As PhotoImportContentTypeFilter, itemSelectionMode As PhotoImportItemSelectionMode) As IAsyncOperationWithProgress( Of PhotoImportFindItemsResult, uint )// You can use this method in JavaScript.
Parameters
contentTypeFilter
PhotoImportContentTypeFilter PhotoImportContentTypeFilter PhotoImportContentTypeFilter PhotoImportContentTypeFilter

A value indicating whether the find operation includes images, videos, or both in the results.

itemSelectionMode
PhotoImportItemSelectionMode PhotoImportItemSelectionMode PhotoImportItemSelectionMode PhotoImportItemSelectionMode

A value indicating whether all items, no items, or only new items in the results are initially marked as selected.

Returns

An asynchronous operation that returns a PhotoImportFindItemsResult on successful completion.

See Also