DispatcherFrame.Continue Propiedad

Definición

Obtiene o establece un valor que indica si debe DispatcherFrame continuar.

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

Valor de propiedad

true si el marco debe continuar; de lo contrario, false. El valor por defecto es true.

Atributos

Ejemplos

En el ejemplo siguiente se muestra cómo usar para DispatcherFrame lograr resultados similares como el método de 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

Comentarios

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

En el apagado de la aplicación, todos los fotogramas se solicitan para salir.

Uso de texto XAML

Los miembros de esta clase no se usan normalmente en XAML o no se pueden usar en XAML.

Se aplica a

Consulte también