IdleDispatchedHandlerArgs.IsDispatcherIdle property

Applies to Windows and Windows Phone

Gets a value that indicates whether the event dispatcher's message queue is empty or not.

Syntax


public bool IsDispatcherIdle { get; }

Property value

Type: System.Boolean [.NET] | Platform::Boolean [C++]

true if the event dispatcher's message queue is empty; false if it is not.

Remarks

Note  This property must be handled within the code for the event handler. This data becomes stale quickly and cannot be stored or used outside of the handler. If you access this property outside of the IdleDispatchedHandler invoked by the call to CoreDispatcher::RunAsync, your call to IsDispatcherIdle will fail.

When a work item is scheduled with the CoreDispatcher::RunAsync method, the item performs any processing only when there are no message pending in the event queue. However, if the IdleDispatchedHandler delegate returned by the callback has the IsDispatcherIdle property set to false, the work item immediately exits background processing until the event queue is empty again.

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8

Namespace

Windows.UI.Core
Windows::UI::Core [C++]

Metadata

Windows.winmd

See also

IdleDispatchedHandlerArgs

 

 

Show:
© 2014 Microsoft