ActivityDesignerTheme ActivityDesignerTheme ActivityDesignerTheme ActivityDesignerTheme Class

定義

警告

此 API 現已淘汰。

為設計階段環境的設計工具提供外觀及操作屬性設定。Provides the look and feel property settings to a designer in a design-time environment.

public ref class ActivityDesignerTheme : System::Workflow::ComponentModel::Design::DesignerTheme
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class ActivityDesignerTheme : System.Workflow.ComponentModel.Design.DesignerTheme
type ActivityDesignerTheme = class
    inherit DesignerTheme
Public Class ActivityDesignerTheme
Inherits DesignerTheme
繼承
ActivityDesignerThemeActivityDesignerThemeActivityDesignerThemeActivityDesignerTheme
衍生
屬性

範例

下列範例示範如何建立自訂 ActivityDesignerTheme,其方式是從 ActivityDesignerTheme 類別衍生,並為新主題設定適當的屬性。The following example shows how to create a custom ActivityDesignerTheme by deriving from the ActivityDesignerTheme class and setting the appropriate properties for the new theme.

public class CustomActivityDesignerTheme : ActivityDesignerTheme
{
    public CustomActivityDesignerTheme(WorkflowTheme theme)
        : base(theme)
    {
        base.Initialize();
        this.BorderStyle = DashStyle.Solid;
        this.BorderColor = Color.FromArgb(0, 0, 0);
        this.BackColorStart = Color.FromArgb(37, 15, 242);
        this.BackColorEnd = Color.FromArgb(189, 184, 254);
        this.BackgroundStyle = LinearGradientMode.Vertical;
        this.ForeColor = Color.Black;
    }
}
Public Class CustomActivityDesignerTheme
    Inherits ActivityDesignerTheme
    Public Sub New(ByVal theme As WorkflowTheme)
        MyBase.new(theme)

        MyBase.Initialize()
        Me.BorderStyle = DashStyle.Solid
        Me.BorderColor = Color.FromArgb(0, 0, 0)
        Me.BackColorStart = Color.FromArgb(37, 15, 242)
        Me.BackColorEnd = Color.FromArgb(189, 184, 254)
        Me.BackgroundStyle = LinearGradientMode.Vertical
        Me.ForeColor = Color.Black
    End Sub
End Class

若要使用 ActivityDesigner 上的主題,請將 ActivityDesignerThemeAttribute 套用至 ActivityDesigner 類別。To use the theme on an ActivityDesigner, apply the ActivityDesignerThemeAttribute to the ActivityDesigner class.

[ActivityDesignerTheme(typeof(CustomActivityDesignerTheme))]
public class CustomActivityDesigner2 : ActivityDesigner
<ActivityDesignerTheme(GetType(CustomActivityDesignerTheme))> _
Public Class CustomActivityDesigner2
    Inherits ActivityDesigner

備註

注意

此資料討論已被汰換的類型及命名空間。This material discusses types and namespaces that are obsolete. 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

設計工具主題可定義設計工具的外觀與操作。Designer themes define the look and feel of a designer. 這包含針對設計工具定義的任何背景樣式、前景樣式、字型和圖示。This includes any background styles, foreground styles, fonts, and icons defined for the designer.

如果您想要提供組態功能給您專屬的設計工具屬性,請建立自訂設計工具主題。You can create a custom designer theme if you want to provide configuration abilities to properties unique to your designer. 如果沒有指定自訂設計工具的設計工具主題,就會使用基底類別 (Base Class) 的主題。If you do not specify a designer theme for a custom designer, the theme from the base class is used.

建構函式

ActivityDesignerTheme(WorkflowTheme) ActivityDesignerTheme(WorkflowTheme) ActivityDesignerTheme(WorkflowTheme) ActivityDesignerTheme(WorkflowTheme)

初始化 ActivityDesignerTheme 的執行個體。Initializes an instance of an ActivityDesignerTheme.

屬性

ApplyTo ApplyTo ApplyTo ApplyTo

取得或設定設計工具主題要套用之設計工具類型的不合格名稱。Gets or sets the unqualified name of the designer type to which the designer theme is applied.

(Inherited from DesignerTheme)
BackColorEnd BackColorEnd BackColorEnd BackColorEnd

取得或設定 Color,做為在背景色彩中使用色彩漸層時的結束色彩。Gets or sets the Color to end with when using a color gradient for the background color.

BackColorStart BackColorStart BackColorStart BackColorStart

取得或設定在背景中使用色彩漸層時的背景開始色彩。Gets or sets the starting color of the background when using a color gradient on the background.

BackgroundStyle BackgroundStyle BackgroundStyle BackgroundStyle

取得或設定背景樣式。Gets or sets the background style.

BoldFont BoldFont BoldFont BoldFont

取得主題的字型。Gets the font for the theme.

BorderColor BorderColor BorderColor BorderColor

取得或設定主題的 BorderColorGets or sets the BorderColor for the theme.

BorderPen BorderPen BorderPen BorderPen

取得主題的 BorderPen。Gets the BorderPen for the theme.

BorderStyle BorderStyle BorderStyle BorderStyle

取得或設定用於框線的樣式。Gets or sets the style used for the border.

BorderWidth BorderWidth BorderWidth BorderWidth

取得框線的寬度 (以像素為單位)。Gets the width of the border in pixels.

ContainingTheme ContainingTheme ContainingTheme ContainingTheme

取得封裝設計工具主題的工作流程主題。Gets the workflow theme that encapsulates the designer theme.

(Inherited from DesignerTheme)
DesignerGeometry DesignerGeometry DesignerGeometry DesignerGeometry

取得設計工具的幾何圖形。Gets the geometry of the designer.

DesignerImage DesignerImage DesignerImage DesignerImage

取得與設計工具關聯的影像。Gets the image associated with the designer.

DesignerImagePath DesignerImagePath DesignerImagePath DesignerImagePath

取得或設定設計工具的影像路徑。Gets or sets the image path for the designer.

DesignerType DesignerType DesignerType DesignerType

取得或設定與設計工具主題關聯的設計工具類型。Gets or sets the type of the designer associated with the designer theme.

(Inherited from DesignerTheme)
Font Font Font Font

取得主題所使用的文字字型。Gets the font of the text used by the theme.

ForeColor ForeColor ForeColor ForeColor

取得或設定前景色彩。Gets or sets the color of the foreground.

ForegroundBrush ForegroundBrush ForegroundBrush ForegroundBrush

取得與主題相關聯的 Brush 物件。Gets the Brush object associated with the theme.

ForegroundPen ForegroundPen ForegroundPen ForegroundPen

取得 Pen,以用於繪製主題前景。Gets the Pen used for painting the foreground of the theme.

ImageSize ImageSize ImageSize ImageSize

取得主題影像的大小。Gets the size of the image of the theme.

ReadOnly ReadOnly ReadOnly ReadOnly

取得值,這個值會指出設計工具主題是否為唯讀。Gets a value that indicates whether the designer theme is read-only.

(Inherited from DesignerTheme)
Size Size Size Size

取得設計工具的大小。Gets the size of the designer.

方法

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

會釋放 Unmanaged 資源,並選擇性地釋放 ActivityDesignerTheme 所使用的 Managed 資源。Releases the unmanaged resources and optionally releases the managed resources used by ActivityDesignerTheme.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetBackgroundBrush(Rectangle) GetBackgroundBrush(Rectangle) GetBackgroundBrush(Rectangle) GetBackgroundBrush(Rectangle)

取得筆刷,用於繪製傳遞之矩形所指定的區域。Gets a brush used to paint the area specified by the rectangle passed.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
Initialize() Initialize() Initialize() Initialize()

初始化設計工具主題。Initializes the designer theme.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
OnAmbientPropertyChanged(AmbientProperty) OnAmbientPropertyChanged(AmbientProperty) OnAmbientPropertyChanged(AmbientProperty) OnAmbientPropertyChanged(AmbientProperty)

呼叫環境設定的信號變更。Called to signal changes to ambient settings.

ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

明確介面實作

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

(Inherited from DesignerTheme)

適用於