ActivityBind 類別

定義

警告

此 API 現已淘汰。

繫結活動的屬性至屬性、欄位、索引子、方法、事件或其他活動的屬性。Binds an activity's property to a property, field, indexer, method, event, or another activity's property. 這個類別無法被繼承。This class cannot be inherited.

public ref class ActivityBind sealed : System::Workflow::ComponentModel::Serialization::MarkupExtension
[System.ComponentModel.Browsable(true)]
[System.ComponentModel.TypeConverter(typeof(System.Workflow.ComponentModel.Design.ActivityBindTypeConverter))]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.ComponentModel.Compiler.ActivityBindValidator))]
public sealed class ActivityBind : System.Workflow.ComponentModel.Serialization.MarkupExtension
type ActivityBind = class
    inherit MarkupExtension
Public NotInheritable Class ActivityBind
Inherits MarkupExtension
繼承
ActivityBind
屬性

備註

注意

此資料討論已被汰換的類型及命名空間。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.

ActivityBind 允許資料從工作流程內的一個活動流動到另一個活動。ActivityBind allows data to flow from one activity to another activity within a workflow. ActivityBind 是一種宣告方式,能完成一些必須改為利用程式碼完成的活動,因此它是大多數全部以 XAML 標記所撰寫的工作流程的主要項目。ActivityBind is a declarative way of doing what otherwise must be accomplished using code, and therefore is a key element of most workflows that are written entirely in XAML markup.

ActivityBind 代表繫結運算式,該運算式中有 Activity 成員做為目標。ActivityBind represents a bind expression that has an Activity member as a target. 目標活動成員可以是屬性、事件或欄位。The target activity member can be a property, an event, or a field. Activity 屬性或方法可使用 ActivityBind 繫結至其他 Activity 成員。An Activity property or method can use ActivityBind to bind to another Activity member.

例如,如果 activity1 將 property1 設為某個值,而 activity2 將其 property1 設為 ActivityBind,其中 Name="activity1" 和 Path="property1",則在執行階段中,activity2.property1 會從 activity1.property1 取得其值。For example, if activity1 has property1 set to some value and if activity2 has its property1 set to ActivityBind with Name="activity1" and Path="property1", at run time the activity2.property1 gets its value from activity1.property1.

建構函式

ActivityBind()

初始化 ActivityBind 類別的新執行個體。Initializes a new instance of the ActivityBind class.

ActivityBind(String)

ActivityBind 參數,初始化 name 類別的新執行個體。Initializes a new instance of the ActivityBind class with the name parameter.

ActivityBind(String, String)

ActivityBindname 參數,初始化 path 類別的新執行個體。Initializes a new instance of the ActivityBind class with name and path parameters.

屬性

Name

取得或設定 Activity 所指向 ActivityBind 的名稱。Gets or sets the name of the Activity that the ActivityBind points to.

Path

取得或設定目標活動其成員的路徑。Gets or sets the path for a member of the target activity. 該值可以用點分隔標記法來指出巢狀值的路徑。The value can use dotted notation to indicate a path to a nested value. 例如,"A.B.C" 路徑指出 ActivityBind 是針對具名為 'C' 的欄位或屬性,'C' 是欄位或屬性 'B' 的成員,而依序 'B' 為欄位或屬性 'A' 的成員,'A' 為目標活動的成員。For example, a path of "A.B.C" indicates that the ActivityBind is to a field or property named 'C', which is a member of the field or property 'B', which in turn is a field or property 'A', which is a member of the target activity.

UserData

取得與這個執行個體相關之使用者資料的 IDictionaryGets an IDictionary of user data relating to this instance.

方法

Equals(Object)

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

(繼承來源 Object)
GetHashCode()

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

(繼承來源 Object)
GetRuntimeValue(Activity)

取得 Object,它表示這個 ActivityBind 的執行階段值。Gets the Object representing the run-time value of this ActivityBind.

GetRuntimeValue(Activity, Type)

取得 Object,它表示這個 ActivityBind 的執行階段值。Gets the Object representing the run-time value of this ActivityBind.

GetType()

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

(繼承來源 Object)
MemberwiseClone()

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

(繼承來源 Object)
ProvideValue(IServiceProvider)

傳回這個類別的目前執行個體。Returns the current instance of this class.

SetRuntimeValue(Activity, Object)

設定執行階段值。Sets the run-time value.

ToString()

計算並傳回 NamePath 屬性字串的組合。Calculates and returns a combination of the Name and Path property strings.

適用於