DispatcherFrame.Continue Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of dit DispatcherFrame moet doorgaan.

public:
 property bool Continue { bool get(); void set(bool value); };
public bool Continue { get; [System.Security.SecurityCritical] set; }
public bool Continue { get; set; }
[<set: System.Security.SecurityCritical>]
member this.Continue : bool with get, set
member this.Continue : bool with get, set
Public Property Continue As Boolean

Waarde van eigenschap

true als het frame moet worden voortgezet; anders, false. De standaardwaarde is true.

Kenmerken

Voorbeelden

In het volgende voorbeeld ziet u hoe u een DispatcherFrame gebruikt om vergelijkbare resultaten te bereiken als de methode Windows Forms DoEvents.

public void DoEvents()
{
    DispatcherFrame frame = new DispatcherFrame();
    Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background,
        new DispatcherOperationCallback(ExitFrame), frame);
    Dispatcher.PushFrame(frame);
}

public object ExitFrame(object f)
{
    ((DispatcherFrame)f).Continue = false;
   
    return null;
}
<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

Opmerkingen

Continue wordt boven aan elke dispatcherlus een query uitgevoerd.

Bij het afsluiten van de toepassing worden alle frames aangevraagd om af te sluiten.

XAML-tekstgebruik

Leden van deze klasse worden doorgaans niet gebruikt in XAML of kunnen niet worden gebruikt in XAML.

Van toepassing op

Zie ook