Share via


AppRecordingManager.SaveScreenshotToFilesAsync 方法

定義

以非同步方式儲存包含呼叫應用程式目前內容的影像檔案。

public:
 virtual IAsyncOperation<AppRecordingSaveScreenshotResult ^> ^ SaveScreenshotToFilesAsync(StorageFolder ^ folder, Platform::String ^ filenamePrefix, AppRecordingSaveScreenshotOption option, IIterable<Platform::String ^> ^ requestedFormats) = SaveScreenshotToFilesAsync;
/// [Windows.Foundation.Metadata.RemoteAsync]
IAsyncOperation<AppRecordingSaveScreenshotResult> SaveScreenshotToFilesAsync(StorageFolder const& folder, winrt::hstring const& filenamePrefix, AppRecordingSaveScreenshotOption const& option, IIterable<winrt::hstring> const& requestedFormats);
[Windows.Foundation.Metadata.RemoteAsync]
public IAsyncOperation<AppRecordingSaveScreenshotResult> SaveScreenshotToFilesAsync(StorageFolder folder, string filenamePrefix, AppRecordingSaveScreenshotOption option, IEnumerable<string> requestedFormats);
function saveScreenshotToFilesAsync(folder, filenamePrefix, option, requestedFormats)
Public Function SaveScreenshotToFilesAsync (folder As StorageFolder, filenamePrefix As String, option As AppRecordingSaveScreenshotOption, requestedFormats As IEnumerable(Of String)) As IAsyncOperation(Of AppRecordingSaveScreenshotResult)

參數

folder
StorageFolder

寫入所錄製媒體檔案的路徑。

filenamePrefix
String

Platform::String

winrt::hstring

用於已儲存影像之檔案名的前置詞。 系統會針對 requestedFormats 參數中指定的每個格式,將適當的副檔名附加至檔案名。

option
AppRecordingSaveScreenshotOption

值,指定儲存螢幕擷取畫面的選項。 為了協助系統執行適當的色彩空間轉換,如果要儲存的內容包含 HDR 內容,應用程式應該指定 HdrContentVisible 。 否則,應用程式應該指定 None

requestedFormats

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

字串清單,指定應該儲存螢幕擷取畫面影像的格式。 使用 SupportedScreenshotMediaEncodingSubtypes 屬性,取得此參數支援的值清單。

傳回

非同步作業,會在完成時傳回 AppRecordingSaveScreenshotResult ,可用來取得儲存作業結果的相關資訊。

屬性

備註

使用 AppRecordingManager 儲存的影像檔案不會內嵌到 GameDVR 或 XBox 應用程式等第一方體驗中。

適用於