StorageLibraryContentChangedTrigger.Create(StorageLibrary) Method

Definition

Creates a trigger that will fire when a file is changed in the specified library.

public:
 static StorageLibraryContentChangedTrigger ^ Create(StorageLibrary ^ storageLibrary);
 static StorageLibraryContentChangedTrigger Create(StorageLibrary const& storageLibrary);
public static StorageLibraryContentChangedTrigger Create(StorageLibrary storageLibrary);
function create(storageLibrary)
Public Shared Function Create (storageLibrary As StorageLibrary) As StorageLibraryContentChangedTrigger

Parameters

storageLibrary
StorageLibrary

The location that the trigger monitors such as the music library or documents library.

Returns

A trigger that monitors the specified location.

Examples

//Get access to the library that you want to monitor 
StorageLibrary picturesLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures); 
var trigger = StorageLibraryContentChangedTrigger.Create(picturesLibrary);

Remarks

For more details on how to use the trigger and a code sample, please see File System Monitoring in Universal Windows Platform Apps

Applies to

See also