ActivityDesignerTheme 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
警告
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
為設計階段環境的設計工具提供外觀及操作屬性設定。
public ref class ActivityDesignerTheme : System::Workflow::ComponentModel::Design::DesignerTheme
public 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
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type ActivityDesignerTheme = class
inherit DesignerTheme
Public Class ActivityDesignerTheme
Inherits DesignerTheme
- 繼承
- 衍生
- 屬性
範例
下列範例示範如何建立自訂 ActivityDesignerTheme,其方式是從 ActivityDesignerTheme 類別衍生,並為新主題設定適當的屬性。
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 類別。
[ActivityDesignerTheme(typeof(CustomActivityDesignerTheme))]
public class CustomActivityDesigner2 : ActivityDesigner
<ActivityDesignerTheme(GetType(CustomActivityDesignerTheme))> _
Public Class CustomActivityDesigner2
Inherits ActivityDesigner
備註
注意
此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型。
設計工具主題可定義設計工具的外觀與操作。 這包含針對設計工具定義的任何背景樣式、前景樣式、字型和圖示。
如果您想要提供組態功能給您專屬的設計工具屬性,請建立自訂設計工具主題。 如果沒有指定自訂設計工具的設計工具主題,就會使用基底類別 (Base Class) 的主題。
建構函式
| ActivityDesignerTheme(WorkflowTheme) |
初始化 ActivityDesignerTheme 的執行個體。 |
屬性
| ApplyTo |
取得或設定設計工具主題要套用之設計工具類型的不合格名稱。 (繼承來源 DesignerTheme) |
| BackColorEnd |
取得或設定 Color,做為在背景色彩中使用色彩漸層時的結束色彩。 |
| BackColorStart |
取得或設定在背景中使用色彩漸層時的背景開始色彩。 |
| BackgroundStyle |
取得或設定背景樣式。 |
| BoldFont |
取得主題的字型。 |
| BorderColor |
取得或設定主題的 BorderColor。 |
| BorderPen |
取得主題的 BorderPen。 |
| BorderStyle |
取得或設定用於框線的樣式。 |
| BorderWidth |
取得框線的寬度 (以像素為單位)。 |
| ContainingTheme |
取得封裝設計工具主題的工作流程主題。 (繼承來源 DesignerTheme) |
| DesignerGeometry |
取得設計工具的幾何圖形。 |
| DesignerImage |
取得與設計工具關聯的影像。 |
| DesignerImagePath |
取得或設定設計工具的影像路徑。 |
| DesignerType |
取得或設定與設計工具主題關聯的設計工具類型。 (繼承來源 DesignerTheme) |
| Font |
取得主題所使用的文字字型。 |
| ForeColor |
取得或設定前景色彩。 |
| ForegroundBrush |
取得與主題相關聯的 Brush 物件。 |
| ForegroundPen |
取得 Pen,以用於繪製主題前景。 |
| ImageSize |
取得主題影像的大小。 |
| ReadOnly |
取得值,這個值會指出設計工具主題是否為唯讀。 (繼承來源 DesignerTheme) |
| Size |
取得設計工具的大小。 |
方法
| Dispose(Boolean) |
會釋放 Unmanaged 資源,並選擇性地釋放 ActivityDesignerTheme 所使用的 Managed 資源。 |
| Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
| GetBackgroundBrush(Rectangle) |
取得筆刷,用於繪製傳遞之矩形所指定的區域。 |
| GetHashCode() |
做為預設雜湊函式。 (繼承來源 Object) |
| GetType() |
取得目前執行個體的 Type。 (繼承來源 Object) |
| Initialize() |
初始化設計工具主題。 |
| MemberwiseClone() |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
| OnAmbientPropertyChanged(AmbientProperty) |
呼叫環境設定的信號變更。 |
| ToString() |
傳回代表目前物件的字串。 (繼承來源 Object) |
明確介面實作
| IDisposable.Dispose() |
執行與釋放 (Free)、釋放 (Release) 或重設 Unmanaged 資源相關聯之應用程式定義的工作。 (繼承來源 DesignerTheme) |