IDesignerGlyphProvider Interface
Defines the method that glyph provider classes use to generate an array of glyphs to display on an activity designer.
Assembly: System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)
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 Friend Class WorkflowMonitorDesignerGlyphProvider Implements IDesignerGlyphProvider Dim activityStatusList As Dictionary(Of String, ActivityStatusInfo) Friend Sub New(ByVal activityStatusList As Dictionary(Of String, ActivityStatusInfo)) Me.activityStatusList = activityStatusList End Sub Public Function GetGlyphs(ByVal activityDesigner As System.Workflow.ComponentModel.Design.ActivityDesigner) As System.Workflow.ComponentModel.Design.ActivityDesignerGlyphCollection Implements System.Workflow.ComponentModel.Design.IDesignerGlyphProvider.GetGlyphs Dim glyphList As ActivityDesignerGlyphCollection = New ActivityDesignerGlyphCollection() 'Walk all of the activities and use the 'CompletedGlyph' for all activities that are not 'closed' For Each activityStatus As ActivityStatusInfo In activityStatusList.Values If activityStatus.Name = activityDesigner.Activity.Name Then If activityStatus.Status = "Closed" Then glyphList.Add(New CompletedGlyph()) Else glyphList.Add(New ExecutingGlyph()) End If End If Next Return glyphList End Function End Class
Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.