-api-id | -api-type |
---|---|
M:Windows.ApplicationModel.Background.StorageLibraryContentChangedTrigger.Create(Windows.Storage.StorageLibrary) |
winrt method |
Creates a trigger that will fire when a file is changed in the specified library.
The location that the trigger monitors such as the music library or documents library.
A trigger that monitors the specified location.
For more details on how to use the trigger and a code sample, please see File System Monitoring in Universal Windows Platform Apps
//Get access to the library that you want to monitor
StorageLibrary picturesLibrary = await StorageLibrary.GetLibraryAsync(KnownLibraryId.Pictures);
var trigger = StorageLibraryContentChangedTrigger.Create(picturesLibrary);