Aracılığıyla paylaş


AmbientTheme.GlyphSize Özellik

Tanım

İş akışı tasarım yüzeyindeki gliflerin ortam yüksekliğini ve genişliğini alır.

public:
 virtual property System::Drawing::Size GlyphSize { System::Drawing::Size get(); };
[System.ComponentModel.Browsable(false)]
public virtual System.Drawing.Size GlyphSize { get; }
[<System.ComponentModel.Browsable(false)>]
member this.GlyphSize : System.Drawing.Size
Public Overridable ReadOnly Property GlyphSize As Size

Özellik Değeri

Size İş akışı tasarım yüzeyindeki gliflerin ortam yüksekliğini ve genişliğini temsil eden bir değer.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, sınıfından türetilen DesignerGlyph bir sınıftan özelliğine GlyphSize erişmenin yaygın bir yolunu gösterir.

Bu kod örneği, DatabaseService.cs dosyasındaki İş Akışı İzleyicisi SDK Örneği'nin bir parçasıdır. Daha fazla bilgi için bkz . İş Akışı İzleyicisi.

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;
}
Public Overrides Function GetBounds(ByVal designer As System.Workflow.ComponentModel.Design.ActivityDesigner, ByVal activated As Boolean) As System.Drawing.Rectangle
    Dim imageBounds As Rectangle = Rectangle.Empty
    Dim image As Image = AppResources.Executing
    If Not image Is Nothing Then
        Dim glyphSize As Size = WorkflowTheme.CurrentTheme.AmbientTheme.GlyphSize
        imageBounds.Location = New Point(designer.Bounds.Right - glyphSize.Width / 2, designer.Bounds.Top - glyphSize.Height / 2)
        imageBounds.Size = glyphSize
    End If
    Return imageBounds
End Function

Şunlara uygulanır

Ayrıca bkz.