Export (0) Print
Expand All

IDesignerGlyphProvider Interface

Defines the method that glyph provider classes use to generate an array of glyphs to display on an activity designer.

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

public interface IDesignerGlyphProvider
public interface IDesignerGlyphProvider
public interface IDesignerGlyphProvider
Not applicable.

This interface defines the method that implementing classes must use to provide an appropriate set of DesignerGlyph objects to activity designers. The implementing class should also render the DesignerGlyph objects onto the ActivityDesigner object.

The following code example demonstrates how you can implement the IDesignerGlyphProvider interface. It shows how you can implement the GetGlyphs method to draw custom glyph objects on an activity designer surface.

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

//Custom glyphprovider used to draw the monitor glyphs on the designer surface
internal class WorkflowMonitorDesignerGlyphProvider : IDesignerGlyphProvider
{
    private Dictionary<string, ActivityStatusInfo> activityStatusList;

    internal WorkflowMonitorDesignerGlyphProvider(Dictionary<string, ActivityStatusInfo> activityStatusList)
    {
        this.activityStatusList = activityStatusList;
    }

    ActivityDesignerGlyphCollection IDesignerGlyphProvider.GetGlyphs(ActivityDesigner activityDesigner)
    {
        ActivityDesignerGlyphCollection glyphList = new ActivityDesignerGlyphCollection();

        //Walk all of the activities and use the 'CompletedGlyph' for all activities that are not 'closed'
        foreach (ActivityStatusInfo activityStatus in activityStatusList.Values)
        {
            if (activityStatus.Name == activityDesigner.Activity.QualifiedName)
            {
                if (activityStatus.Status == "Closed")
                    glyphList.Add(new CompletedGlyph());
                else
                    glyphList.Add(new ExecutingGlyph());
            }
        }

        return glyphList;
    }
}

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft