PhotoImportSource
PhotoImportSource
PhotoImportSource
PhotoImportSource
Class
Definition
Represents the source device for a photo import session.
public : sealed class PhotoImportSource : IPhotoImportSourcepublic sealed class PhotoImportSource : IPhotoImportSourcePublic NotInheritable Class PhotoImportSource Implements IPhotoImportSource// You can use this class in JavaScript.
- Attributes
| 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 PhotoImportSession.Source property or by calling PhotoImportSource.FromIdAsync or PhotoImportSource.FromFolderAsync.
Properties
BatteryLevelPercent BatteryLevelPercent BatteryLevelPercent BatteryLevelPercent
The battery level of the source device.
public : IReference<uint> BatteryLevelPercent { get; }public Nullable<uint> BatteryLevelPercent { get; }Public ReadOnly Property BatteryLevelPercent As Nullable<uint>// You can use this property in JavaScript.
- Value
- IReference<unsigned int> Nullable<uint> Nullable<uint> Nullable<uint>
A value from 0 to 100 that indicates the power level of the device battery, with 0 being none, and 100 being fully charged.
ConnectionProtocol ConnectionProtocol ConnectionProtocol ConnectionProtocol
Gets the connection protocol that is being used to communicate with the source device.
public : PlatForm::String ConnectionProtocol { get; }public string ConnectionProtocol { get; }Public ReadOnly Property ConnectionProtocol As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The connection protocol that is being used to communicate with the source device.
ConnectionTransport ConnectionTransport ConnectionTransport ConnectionTransport
Gets a value indicating the transport mechanism that is being used for importing items from the source device.
public : PhotoImportConnectionTransport ConnectionTransport { get; }public PhotoImportConnectionTransport ConnectionTransport { get; }Public ReadOnly Property ConnectionTransport As PhotoImportConnectionTransport// You can use this property in JavaScript.
- Value
- PhotoImportConnectionTransport PhotoImportConnectionTransport PhotoImportConnectionTransport PhotoImportConnectionTransport
A value indicating the transport mechanism that is being used for importing items from the source device.
DateTime DateTime DateTime DateTime
Gets the current date and time on the device.
public : IReference<DateTime> DateTime { get; }public Nullable<DateTimeOffset> DateTime { get; }Public ReadOnly Property DateTime As Nullable<DateTimeOffset>// You can use this property in JavaScript.
- Value
- IReference<DateTime> Nullable<DateTimeOffset> Nullable<DateTimeOffset> Nullable<DateTimeOffset>
The current date and time on the device.
Description Description Description Description
Gets a human-readable description of the source device.
public : PlatForm::String Description { get; }public string Description { get; }Public ReadOnly Property Description As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A human-readable description of the device.
DisplayName DisplayName DisplayName DisplayName
Gets the human-readable display name for the source device.
public : PlatForm::String DisplayName { get; }public string DisplayName { get; }Public ReadOnly Property DisplayName As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The human-readable display name for the source device.
Id Id Id Id
Gets a unique 16-byte identifier that is common across multiple transports supported by the device.
public : PlatForm::String Id { get; }public string Id { get; }Public ReadOnly Property Id As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
A unique 16-byte identifier that is common across multiple transports supported by the device.
IsLocked IsLocked IsLocked IsLocked
Gets a value indicating if the source device is locked.
public : IReference<bool> IsLocked { get; }public Nullable<bool> IsLocked { get; }Public ReadOnly Property IsLocked As Nullable<bool>// You can use this property in JavaScript.
- Value
- IReference<PlatForm::Boolean> Nullable<bool> Nullable<bool> Nullable<bool>
True if the source device is locked; otherwise, false.
IsMassStorage IsMassStorage IsMassStorage IsMassStorage
Gets a value indicating if the source device is a mass storage device.
public : PlatForm::Boolean IsMassStorage { get; }public bool IsMassStorage { get; }Public ReadOnly Property IsMassStorage As bool// You can use this property in JavaScript.
- Value
- PlatForm::Boolean bool bool bool
True if the source device is a mass storage device; otherwise, false.
Manufacturer Manufacturer Manufacturer Manufacturer
Gets the source device's human-readable manufacturer name.
public : PlatForm::String Manufacturer { get; }public string Manufacturer { get; }Public ReadOnly Property Manufacturer As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The source device's human-readable manufacturer name.
Model Model Model Model
Gets the device model name.
public : PlatForm::String Model { get; }public string Model { get; }Public ReadOnly Property Model As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The device model name.
PowerSource PowerSource PowerSource PowerSource
Gets a value indicating the type of power source being used by the source device, if it is known.
public : PhotoImportPowerSource PowerSource { get; }public PhotoImportPowerSource PowerSource { get; }Public ReadOnly Property PowerSource As PhotoImportPowerSource// You can use this property in JavaScript.
A value indicating the type of power source being used by the source device.
SerialNumber SerialNumber SerialNumber SerialNumber
Gets the serial number of the device.
public : PlatForm::String SerialNumber { get; }public string SerialNumber { get; }Public ReadOnly Property SerialNumber As string// You can use this property in JavaScript.
- Value
- PlatForm::String string string string
The serial number of the device.
StorageMedia StorageMedia StorageMedia StorageMedia
Gets a list of objects representing the different storage media exposed by the source device.
public : IVectorView<PhotoImportStorageMedium> StorageMedia { get; }public IReadOnlyList<PhotoImportStorageMedium> StorageMedia { get; }Public ReadOnly Property StorageMedia As IReadOnlyList<PhotoImportStorageMedium>// You can use this property in JavaScript.
- Value
- IVectorView<PhotoImportStorageMedium> IReadOnlyList<PhotoImportStorageMedium> IReadOnlyList<PhotoImportStorageMedium> IReadOnlyList<PhotoImportStorageMedium>
A list of objects representing the different storage media exposed by the source device.
Thumbnail Thumbnail Thumbnail Thumbnail
Gets a reference to a stream containing the thumbnail image for the source device.
public : IRandomAccessStreamReference Thumbnail { get; }public IRandomAccessStreamReference Thumbnail { get; }Public ReadOnly Property Thumbnail As IRandomAccessStreamReference// You can use this property in JavaScript.
- Value
- IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference IRandomAccessStreamReference
A reference to a stream containing the thumbnail image for the source device.
Type Type Type Type
Gets a value indicating the type of the source device.
public : PhotoImportSourceType Type { get; }public PhotoImportSourceType Type { get; }Public ReadOnly Property Type As PhotoImportSourceType// You can use this property in JavaScript.
A value indicating the type of the storage device.
Methods
CreateImportSession() CreateImportSession() CreateImportSession() CreateImportSession()
Creates a new photo import session.
public : PhotoImportSession CreateImportSession()public PhotoImportSession CreateImportSession()Public Function CreateImportSession() As PhotoImportSession// You can use this method in JavaScript.
FromFolderAsync(IStorageFolder) FromFolderAsync(IStorageFolder) FromFolderAsync(IStorageFolder) FromFolderAsync(IStorageFolder)
Creates a new instance of PhotoImportSource from the specified root folder.
public : static IAsyncOperation<PhotoImportSource> FromFolderAsync(IStorageFolder sourceRootFolder)public static IAsyncOperation<PhotoImportSource> FromFolderAsync(IStorageFolder sourceRootFolder)Public Static Function FromFolderAsync(sourceRootFolder As IStorageFolder) As IAsyncOperation( Of PhotoImportSource )// You can use this method in JavaScript.
- sourceRootFolder
- IStorageFolder IStorageFolder IStorageFolder IStorageFolder
The root folder from which the photo import source is created.
An asynchronous operation that returns a PhotoImportSource upon successful completion.
FromIdAsync(String) FromIdAsync(String) FromIdAsync(String) FromIdAsync(String)
Creates a new instance of PhotoImportSource from the specified device ID.
public : static IAsyncOperation<PhotoImportSource> FromIdAsync(PlatForm::String sourceId)public static IAsyncOperation<PhotoImportSource> FromIdAsync(String sourceId)Public Static Function FromIdAsync(sourceId As String) As IAsyncOperation( Of PhotoImportSource )// You can use this method in JavaScript.
- sourceId
- PlatForm::String String String String
The root folder from which the photo import source is created.
An asynchronous operation that returns a PhotoImportSource upon successful completion.