Share via


DispatcherFrame.Continue Propiedad

Definición

Obtiene o establece un valor que indica si este DispatcherFrame debería continuar.

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

Valor de propiedad

Boolean

true si el marco debe continuar; en caso contrario, false. El valor predeterminado es true.

Atributos

Ejemplos

En el ejemplo siguiente se muestra cómo usar un DispatcherFrame para lograr resultados similares como el método Windows FormsDoEvents.

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

Comentarios

Continue se consulta en la parte superior de cada bucle de distribuidor.

En el apagado de la aplicación, se solicita que se cierren todos los fotogramas.

Uso de texto XAML

Los miembros de esta clase no se utilizan habitualmente en XAML o no se pueden utilizar en XAML.

Se aplica a

Consulte también