CompositeActivityDesigner.Expanded 속성

정의

CompositeActivityDesigner가 확장명 상태인지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 virtual property bool Expanded { bool get(); void set(bool value); };
public virtual bool Expanded { get; set; }
member this.Expanded : bool with get, set
Public Overridable Property Expanded As Boolean

속성 값

CompositeActivityDesigner가 확장되었으면 true이고, 그렇지 않으면 false입니다.

예제

다음 코드 예제에서는 메서드에 인수로 전달된 Expanded 값을 기준으로 Boolean 속성을 설정하는 방법을 보여 줍니다.

이 코드 예제는 ViewHost.cs 파일에 있는 Workflow Monitor SDK 샘플의 일부입니다. 자세한 내용은 워크플로 모니터합니다.

internal void Expand(bool expand)
{
    IDesignerHost host = GetService(typeof(IDesignerHost)) as IDesignerHost;
    if (host == null)
        return;

    this.SuspendLayout();

    CompositeActivity root = host.RootComponent as CompositeActivity;
    foreach (Activity activity in root.Activities)
    {
        CompositeActivityDesigner compositeActivityDesigner = host.GetDesigner((IComponent)activity) as CompositeActivityDesigner;
        if (compositeActivityDesigner != null)
        {
            compositeActivityDesigner.Expanded = expand;
        }
    }

    this.ResumeLayout(true);
}
Friend Sub Expand(ByVal expand As Boolean)
    Dim host As IDesignerHost = GetService(GetType(IDesignerHost))
    If host Is Nothing Then
        Return
    End If

    Me.SuspendLayout()

    Dim root As CompositeActivity = host.RootComponent
    Dim activity As Activity
    For Each activity In root.Activities
        Dim compositeActivityDesigner As CompositeActivityDesigner = host.GetDesigner(CType(activity, IComponent))
        If compositeActivityDesigner IsNot Nothing Then
            compositeActivityDesigner.Expanded = expand
        End If
    Next

    Me.ResumeLayout(True)
End Sub

설명

사용자가 OnMouseDown의 확장명 또는 축소 단추를 클릭할 때 적절한 작업을 결정하려면 ExpandButtonRectangleExpanded과 함께 CompositeActivityDesigner를 사용합니다.

적용 대상

추가 정보