StorageFolder.TryGetChangeTracker StorageFolder.TryGetChangeTracker StorageFolder.TryGetChangeTracker StorageFolder.TryGetChangeTracker StorageFolder.TryGetChangeTracker Method

Definition

Gets the StorageLibraryChangeTracker associated with a StorageFolder.

public : StorageLibraryChangeTracker TryGetChangeTracker()
StorageLibraryChangeTracker TryGetChangeTracker() const;
public StorageLibraryChangeTracker TryGetChangeTracker()
Public Function TryGetChangeTracker() As StorageLibraryChangeTracker
var storageLibraryChangeTracker = storageFolder.tryGetChangeTracker();

Returns

Additional features and requirements

Device family
Windows 10, version 1803 (introduced v10.0.17134.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v6)

Examples

This example demonstrates getting a StorageLibraryChangeTracker from a StorageFolder, and then enabling the tracker.

private void EnableChangeTracker(StorageFolder folder) 
{ 
    // Get the change tracker object corresponding to the StorageFolder in the parameters 
    StorageLibraryChangeTracker tracker = folder.TryGetChangeTracker(); 
    if (tracker != null) 
    { 
        tracker.Enable(); 
    } 
} 

See also