WorkflowTheme.CurrentTheme Propiedad

Definición

Obtiene o establece el tema actual.Gets or sets the current theme.

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; }
member this.CurrentTheme : System.Workflow.ComponentModel.Design.WorkflowTheme with get, set
Public Shared Property CurrentTheme As WorkflowTheme

Valor de propiedad

Un WorkflowTheme que se utiliza para la configuración de pantalla.A WorkflowTheme that is used for display settings.

Ejemplos

El ejemplo de código siguiente muestra cómo utilizar la propiedad CurrentTheme para tener acceso al AmbientTheme asociado a un flujo de trabajo.The following code example shows how to use the CurrentTheme property to access the AmbientTheme associated with a workflow.

Este ejemplo de código forma parte del ejemplo SDK del monitor de flujo de trabajo del archivo DesignerGlyphProvider.cs.This code example is part of the Workflow Monitor SDK Sample from the DesignerGlyphProvider.cs file. Para obtener más información, vea monitor de flujo de trabajo.For more information, see Workflow Monitor.

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

Comentarios

Utilice CurrentTheme para realizar cambios en el tema utilizado para mostrar el flujo de trabajo.Use CurrentTheme to make changes to the theme used to display the workflow.

Se aplica a

Consulte también: