0 out of 1 rated this helpful - Rate this topic

IStorageQueryResultBase.ContentsChanged event

Applies to Windows only

Fires when an item is added, deleted or modified in the folder being queried.


event TypedEventHandler<IStorageQueryResultBase, Object>^ ContentsChanged {
   Windows::Foundation::EventRegistrationToken add(TypedEventHandler<IStorageQueryResultBase, Object>^ value);
   void remove(Windows::Foundation::EventRegistrationToken token);

Event information

Delegate TypedEventHandler<IStorageQueryResultBase, Object>


If you register a handler for this event, keep that handler registered while you suspend your app (in response to oncheckpoint or Suspending). Your app will not receive ContentsChanged events while it is suspended and when your app resumes it will receive a single event that aggregates all of the changes if any occurred.

Additionally, keep in mind that registering and removing event handlers are synchronous operations and might cause your app to hang briefly if you execute them on your app's UI thread. Wherever possible, use a thread other than your app's UI thread to register and unregister these event handlers.


Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

None supported


Windows::Storage::Search [C++]



See also




Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft. All rights reserved.