IdleDispatchedHandlerArgs IdleDispatchedHandlerArgs IdleDispatchedHandlerArgs Class

Defines the arguments returned by a IdleDispatchedHandler callback.

Syntax

Declaration

public sealed class IdleDispatchedHandlerArgspublic sealed class IdleDispatchedHandlerArgsPublic NotInheritable Class IdleDispatchedHandlerArgs

Remarks

Note

: This class is not agile, which means that you need to consider its threading model and marshaling behavior. For more info, see Threading and Marshaling (C++/CX).

Properties summary

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

Properties

  • IsDispatcherIdle
    IsDispatcherIdle
    IsDispatcherIdle
    IsDispatcherIdle

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

    public bool IsDispatcherIdle { get; }public bool IsDispatcherIdle { get; }Public ReadOnly Property IsDispatcherIdle As boolpublic bool IsDispatcherIdle { get; }

    Property Value

    • bool
      bool
      bool

      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 RunAsync(CoreDispatcherPriority, DispatchedHandler), your call to IsDispatcherIdle will fail.

    When a work item is scheduled with the RunAsync(CoreDispatcherPriority, DispatchedHandler) 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.

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.MuseAttribute
Windows.Foundation.Metadata.WebHostHiddenAttribute

Details

Assembly

Windows.UI.Core.dll