WorkflowTheme.CurrentTheme Özellik

Tanım

Geçerli temayı alır veya ayarlar.

public:
 static property System::Workflow::ComponentModel::Design::WorkflowTheme ^ CurrentTheme { System::Workflow::ComponentModel::Design::WorkflowTheme ^ get(); void set(System::Workflow::ComponentModel::Design::WorkflowTheme ^ value); };
public static System.Workflow.ComponentModel.Design.WorkflowTheme CurrentTheme { get; set; }
static member CurrentTheme : System.Workflow.ComponentModel.Design.WorkflowTheme with get, set
Public Shared Property CurrentTheme As WorkflowTheme

Özellik Değeri

WorkflowTheme Görüntü ayarları için kullanılan bir.

Örnekler

Aşağıdaki kod örneği, bir iş akışıyla ilişkilendirilmiş öğesine erişmek için özelliğinin AmbientTheme nasıl kullanılacağını CurrentTheme gösterir.

Bu kod örneği, DesignerGlyphProvider.cs dosyasındaki İş Akışı İzleyicisi SDK Örneğinin 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

Açıklamalar

İş akışını görüntülemek için kullanılan temada değişiklik yapmak için kullanın CurrentTheme .

Şunlara uygulanır

Ayrıca bkz.