ActivityToolboxItem 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

提供與工作流程設計工具中活動關聯之所有工具箱項目的基底類別 (Base Class)。

public ref class ActivityToolboxItem : System::Drawing::Design::ToolboxItem
[System.Serializable]
public class ActivityToolboxItem : System.Drawing.Design.ToolboxItem
[System.Serializable]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public class ActivityToolboxItem : System.Drawing.Design.ToolboxItem
[<System.Serializable>]
type ActivityToolboxItem = class
    inherit ToolboxItem
[<System.Serializable>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type ActivityToolboxItem = class
    inherit ToolboxItem
Public Class ActivityToolboxItem
Inherits ToolboxItem
繼承
ActivityToolboxItem
屬性

範例

下列範例顯示自訂活動的完整 ActivityToolboxItem 類別。 在本範例中,會覆寫 CreateComponentsCore 方法,以在 ParallelActivity 中放置 2 個自訂活動。

[Serializable]
internal sealed class CustomActivityToolboxItem : ActivityToolboxItem
{
    public CustomActivityToolboxItem(Type type)
        : base(type)
    {
    }

    private CustomActivityToolboxItem(SerializationInfo info, StreamingContext context)
    {
        Deserialize(info, context);
    }

    protected override IComponent[] CreateComponentsCore(IDesignerHost designerHost)
    {
        CompositeActivity parallel = new ParallelActivity();
        parallel.Activities.Add(new CustomActivity());
        parallel.Activities.Add(new CustomActivity());

        return new IComponent[] { parallel };
    }
}
<Serializable()> _
Friend Class CustomActivityToolboxItem
    Inherits ActivityToolboxItem

    Public Sub New(ByVal type As Type)
        MyBase.new(type)
    End Sub

    Private Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        Deserialize(info, context)
    End Sub

    Protected Overrides Function CreateComponentsCore(ByVal designerHost As IDesignerHost) As IComponent()
        Dim parallel As New ParallelActivity()
        parallel.Activities.Add(New CustomActivity())
        parallel.Activities.Add(New CustomActivity())

        Return New IComponent() {parallel}
    End Function
End Class

備註

注意

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

Activity 類別關聯的所有工具箱項目都衍生自 ActivityToolboxItem。 這個類別會顯示設計階段環境工具箱中 Activity 類別的圖形表示,並在使用者將其拖曳至設計介面時建立與其關聯之 Activity 類別的執行個體。 活動工具箱項目通常表示在設計模式文件上受到叫用 (Invoke) 時所要建立的活動。

這個類別會直接繼承 ToolboxItem 類別。

建構函式

ActivityToolboxItem()
已淘汰.

初始化 ActivityToolboxItem 類別的新執行個體。

ActivityToolboxItem(SerializationInfo, StreamingContext)
已淘汰.

使用指定的 ActivityToolboxItemSerializationInfo 來初始化 StreamingContext 類別的新執行個體。

ActivityToolboxItem(Type)
已淘汰.

初始化 ActivityToolboxItem 類別的新執行個體,以建立 Activity 元件的指定型別。

屬性

AssemblyName
已淘汰.

取得或設定組件的名稱,該組件包含類型或工具箱項目所建立的類型。

(繼承來源 ToolboxItem)
Bitmap
已淘汰.

取得或設定點陣圖,表示工具箱中的工具箱項目。

(繼承來源 ToolboxItem)
Company
已淘汰.

取得或設定這個 ToolboxItem 的公司名稱。

(繼承來源 ToolboxItem)
ComponentType
已淘汰.

取得這個 ToolboxItem 的元件型別。

(繼承來源 ToolboxItem)
DependentAssemblies
已淘汰.

取得或設定工具箱項目的 AssemblyName

(繼承來源 ToolboxItem)
Description
已淘汰.

取得或設定這個 ToolboxItem 的描述。

(繼承來源 ToolboxItem)
DisplayName
已淘汰.

取得或設定工具箱項目的顯示名稱。

(繼承來源 ToolboxItem)
Filter
已淘汰.

取得或設定篩選條件,判斷工具箱項目是否可以在目的元件上使用。

(繼承來源 ToolboxItem)
IsTransient
已淘汰.

取得值,指出工具箱項目是否為暫時性 (Transient)。

(繼承來源 ToolboxItem)
Locked
已淘汰.

取得值,指出 ToolboxItem 目前是否已鎖定。

(繼承來源 ToolboxItem)
OriginalBitmap
已淘汰.

取得或設定此項目工具箱中將使用的原始點陣圖。

(繼承來源 ToolboxItem)
Properties
已淘汰.

取得屬性的字典。

(繼承來源 ToolboxItem)
TypeName
已淘汰.

取得或設定叫用工具箱項目時所建立的 IComponent 的型別完整名稱。

(繼承來源 ToolboxItem)
Version
已淘汰.

取得這個 ToolboxItem 的版本。

(繼承來源 ToolboxItem)

方法

CheckUnlocked()
已淘汰.

如果工具箱項目目前是鎖定的,則會擲回例外狀況。

(繼承來源 ToolboxItem)
CreateComponents()
已淘汰.

建立工具箱項目受到設定要建立的元件。

(繼承來源 ToolboxItem)
CreateComponents(IDesignerHost)
已淘汰.

使用指定的設計工具主應用程式 (Designer Host),建立工具箱項目受到設定要建立的元件。

(繼承來源 ToolboxItem)
CreateComponents(IDesignerHost, IDictionary)
已淘汰.

使用指定的設計工具主應用程式 (Designer Host) 和預設值,建立工具箱項目設定為要建立的元件。

(繼承來源 ToolboxItem)
CreateComponentsCore(IDesignerHost)
已淘汰.

叫用工具箱項目時建立 Activity 元件或 Activity 元件的陣列。

CreateComponentsCore(IDesignerHost, IDictionary)
已淘汰.

在叫用工具箱項目時建立元件陣列。

(繼承來源 ToolboxItem)
CreateComponentsWithUI(IDesignerHost)
已淘汰.

建立 Activity 元件或 Activity 元件的陣列,它會在叫用工具箱項目時在設計介面上產生對話方塊。

Deserialize(SerializationInfo, StreamingContext)
已淘汰.

從指定的序列化資訊物件載入工具箱項目的狀態。

(繼承來源 ToolboxItem)
Equals(Object)
已淘汰.

判斷兩個 ToolboxItem 執行個體是否相等。

(繼承來源 ToolboxItem)
FilterPropertyValue(String, Object)
已淘汰.

在傳回前篩選屬性值。

(繼承來源 ToolboxItem)
GetHashCode()
已淘汰.

傳回這個執行個體的雜湊碼。

(繼承來源 ToolboxItem)
GetToolboxDisplayName(Type)
已淘汰.

取得在工具箱中工具箱項目的關聯顯示名稱。

GetToolboxImage(Type)
已淘汰.

取得用來表示工具箱中工具箱項目的關聯影像。

GetType()
已淘汰.

取得目前執行個體的 Type

(繼承來源 Object)
GetType(IDesignerHost)
已淘汰.

啟用對與工具箱項目關聯之類型的存取。

(繼承來源 ToolboxItem)
GetType(IDesignerHost, AssemblyName, String, Boolean)
已淘汰.

建立指定類型的執行個體,並選擇性使用指定的設計工具主應用程式和組件名稱。

(繼承來源 ToolboxItem)
Initialize(Type)
已淘汰.

使用要建立的指定類型來初始化目前工具箱項目。

(繼承來源 ToolboxItem)
Lock()
已淘汰.

鎖定工具箱項目並防止變更其屬性。

(繼承來源 ToolboxItem)
MemberwiseClone()
已淘汰.

建立目前 Object 的淺層複製。

(繼承來源 Object)
OnComponentsCreated(ToolboxComponentsCreatedEventArgs)
已淘汰.

引發 ComponentsCreated 事件。

(繼承來源 ToolboxItem)
OnComponentsCreating(ToolboxComponentsCreatingEventArgs)
已淘汰.

引發 ComponentsCreating 事件。

(繼承來源 ToolboxItem)
Serialize(SerializationInfo, StreamingContext)
已淘汰.

將工具箱項目的狀態儲存到指定的序列化資訊物件。

(繼承來源 ToolboxItem)
ToString()
已淘汰.

傳回代表目前 ToolboxItemString

(繼承來源 ToolboxItem)
ValidatePropertyType(String, Object, Type, Boolean)
已淘汰.

驗證物件是否為指定類型。

(繼承來源 ToolboxItem)
ValidatePropertyValue(String, Object)
已淘汰.

將屬性指派給屬性字典前驗證屬性。

(繼承來源 ToolboxItem)

事件

ComponentsCreated
已淘汰.

立即發生於建立元件之後。

(繼承來源 ToolboxItem)
ComponentsCreating
已淘汰.

發生於即將建立元件時。

(繼承來源 ToolboxItem)

明確介面實作

ISerializable.GetObjectData(SerializationInfo, StreamingContext)
已淘汰.

如需這個成員的描述,請參閱 GetObjectData(SerializationInfo, StreamingContext) 方法。

(繼承來源 ToolboxItem)

適用於