IDesignerGlyphProvider Interface

Definition

Caution

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

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

C#
public interface IDesignerGlyphProvider
C#
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public interface IDesignerGlyphProvider
Attributes

Examples

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.

C#
//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;
    }
}

Remarks

Napomena

This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

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.

Methods

GetGlyphs(ActivityDesigner)

Returns an array of glyphs that are associated with the specified activity designer.

Applies to

Proizvod Verzije (Zastarjelo)
.NET Framework 3.0, 3.5, 4.0 (4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1)

See also