共用方式為


PhotoImportSession 類別

定義

代表具有相片匯入來源的相片匯入會話。

public ref class PhotoImportSession sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class PhotoImportSession final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class PhotoImportSession : System.IDisposable
Public NotInheritable Class PhotoImportSession
Implements IDisposable
繼承
Object Platform::Object IInspectable PhotoImportSession
屬性
實作

Windows 需求

裝置系列
Windows 10 (已於 10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox 引進)
API contract
Windows.Foundation.UniversalApiContract (已於 v1.0 引進)

備註

藉由存取 PhotoImportOperation.Session 屬性或呼叫 PhotoImportSource.CreateImportSession來取得這個類別的實例。

如需將媒體匯入新增至應用程式的方式指引,請參閱 從裝置匯入媒體

版本歷程記錄

Windows 版本 SDK 版本 新增值
1607 14393 RememberDeselectedItems
1607 14393 SubfolderDateFormat

屬性

AppendSessionDateToDestinationFolder

取得或設定值,指定是否應該將會話日期附加至目的地資料夾名稱。

DestinationFileNamePrefix

取得或設定目的地檔案名的前置詞。

DestinationFolder

取得或設定相片匯入會話的目的地資料夾。

RememberDeselectedItems

取得值,指出是否應該記住會話的已取消選取專案。

SessionId

取得匯入會話的唯一識別碼。

Source

取得 物件,表示與相片匯入會話相關聯的來源裝置。

SubfolderCreationMode

取得或設定值,指出用來命名目的地資料夾內子資料夾的方法。

SubfolderDateFormat

取得或設定值,指出會話用於子資料夾的日期格式。

方法

Close()

關閉相片匯入會話,並釋放相關聯的資源。

Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。

FindItemsAsync(PhotoImportContentTypeFilter, PhotoImportItemSelectionMode)

以非同步方式尋找來源裝置上可供匯入的專案。

適用於

另請參閱