WorkflowTheme.CurrentTheme Property

Definition

Gets or sets the current theme.

C#
public static System.Workflow.ComponentModel.Design.WorkflowTheme CurrentTheme { get; set; }

Property Value

A WorkflowTheme that is used for display settings.

Examples

The following code example shows how to use the CurrentTheme property to access the AmbientTheme associated with a workflow.

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

C#
public override Rectangle GetBounds(ActivityDesigner designer, bool activated)
{
    Rectangle imageBounds = Rectangle.Empty;
    Image image = Resources.Executing;
    if (image != null)
    {
        Size glyphSize = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize;
        imageBounds.Location = new Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2);
        imageBounds.Size = glyphSize;
    }
    return imageBounds;
}

Remarks

Use CurrentTheme to make changes to the theme used to display the workflow.

Applies to

Product Versions
.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