DispatcherFrame.Continue Vlastnost

Definice

Získá nebo nastaví hodnotu, která označuje, zda má pokračovat DispatcherFrame .

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

Hodnota vlastnosti

Boolean

truepokud by měl rámec pokračovat; v opačném případě . false Výchozí hodnota je true.

Atributy

Příklady

Následující příklad ukazuje, jak použít DispatcherFrame k dosažení podobných výsledků jako model Windows Forms DoEvents metoda.

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

Poznámky

Continue je dotazován v horní části každé smyčky dispečera.

Při vypnutí aplikace jsou všechny rámce požadovány k ukončení.

Použití textu XAML

Členy této třídy buď obvykle nejsou v jazyce XAML používány, nebo je v jazyce XAML nelze použít.

Platí pro

Viz také