Represents an execution loop in the Dispatcher.
Assembly: WindowsBase (in WindowsBase.dll)
XMLNS for XAML: Not mapped to an xmlns.
Thetype exposes the following members.
|CheckAccess||Determines whether the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|Finalize||Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
|VerifyAccess||Enforces that the calling thread has access to this DispatcherObject. (Inherited from DispatcherObject.)|
objects typically fall into two categories:
Long running, general purpose frames that exit only when instructed to. These frames should exit when they are requested.
Short running, very specific frames that exit when an important criteria is met. These frames may consider not to exit when they are requested in favor of waiting for their exit criteria to be met. These frames should have a time-out associated with them.
The following example shows how to use a to achieve similar results as the Windows Forms DoEvents method.
<SecurityPermissionAttribute(SecurityAction.Demand, Flags := SecurityPermissionFlag.UnmanagedCode)> Public Sub DoEvents() Dim frame As New DispatcherFrame() Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, New DispatcherOperationCallback(AddressOf ExitFrame), frame) Dispatcher.PushFrame(frame) End Sub Public Function ExitFrame(ByVal f As Object) As Object CType(f, DispatcherFrame).Continue = False Return Nothing End Function