AmbientTheme.GlyphSize Property

Definition

Gets the ambient height and width of glyphs on the workflow design surface.

C#
[System.ComponentModel.Browsable(false)]
public virtual System.Drawing.Size GlyphSize { get; }

Property Value

A Size value that represents the ambient height and width of glyphs on the workflow design surface.

Attributes

Examples

The following code example demonstrates a common way you can access the GlyphSize property from a class that derives from the DesignerGlyph class.

This code example is part of the Workflow Monitor SDK Sample from the DatabaseService.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;
}

Applies to

Produkt Verzie
.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