Sdílet prostřednictvím


WorkflowTheme.CurrentTheme Vlastnost

Definice

Získá nebo nastaví aktuální motiv.

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

Hodnota vlastnosti

A WorkflowTheme , který se používá pro nastavení zobrazení.

Příklady

Následující příklad kódu ukazuje, jak použít CurrentTheme vlastnost pro přístup k pracovnímu AmbientTheme postupu.

Tento příklad kódu je součástí ukázky sady SDK pro monitorování pracovního postupu ze souboru DesignerGlyphProvider.cs. Další informace najdete v tématu Monitorování pracovního postupu.

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

Poznámky

Umožňuje CurrentTheme provádět změny motivu použitého k zobrazení pracovního postupu.

Platí pro

Viz také