DispatcherFrame.Continue 속성

정의

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

속성 값

true프레임이 계속되어야 하는 경우 그렇지 않으면 . false 기본값은 true입니다.

특성

예제

다음 예제에서는 Windows Forms DispatcherFrame 메서드와 비슷한 결과를 얻기 위해 a 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

설명

Continue 는 각 디스패처 루프의 맨 위에 쿼리됩니다.

애플리케이션 종료 시 모든 프레임은 종료를 요청합니다.

XAML 텍스트 사용

이 클래스의 멤버는 일반적으로 XAML에서 사용되지 않거나 XAML에서 사용할 수 없습니다.

적용 대상

추가 정보