Export (0) Print
Expand All

CompositeActivityDesigner.Expanded Property

Gets or sets a value that indicates whether the CompositeActivityDesigner is expanded.

Namespace:  System.Workflow.ComponentModel.Design
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

public virtual bool Expanded { get; set; }

Property Value

Type: System.Boolean
true if the CompositeActivityDesigner is expanded; otherwise false.

In combination with OnMouseDown and ExpandButtonRectangle, use Expanded to determine the proper action when a user clicks the expand or collapse button on the CompositeActivityDesigner.

The following code example demonstrates how you can set the Expanded property based on a Boolean value passed as an argument to a method.

This code example is part of the Workflow Monitor SDK sample from the ViewHost.cs file. For more information, see Workflow Monitor.

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


    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;


.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

© 2014 Microsoft