Share via


CompositeActivityDesigner.Expanded Özellik

Tanım

öğesinin genişletilip genişletildiğini CompositeActivityDesigner belirten bir değer alır veya ayarlar.

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

Özellik Değeri

trueCompositeActivityDesigner genişletilirse; genişletilirse.false

Örnekler

Aşağıdaki kod örneği, bir yönteme Expanded bağımsız değişken olarak geçirilen bir Boolean değeri temel alarak özelliğini nasıl ayarlayabileceğinizi gösterir.

Bu kod örneği, ViewHost.cs dosyasındaki İş Akışı İzleyicisi SDK örneğinin bir parçasıdır. Daha fazla bilgi için bkz . İş Akışı İzleyicisi.

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

Açıklamalar

ve ile birlikteOnMouseDown, kullanıcı üzerindeki CompositeActivityDesignergenişlet veya daralt düğmesine tıkladığında uygun eylemi belirlemek için kullanınExpanded.ExpandButtonRectangle

Şunlara uygulanır

Ayrıca bkz.