ComponentChangedEventArgs 類別
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供 ComponentChanged 事件的資料。 此類別無法獲得繼承。
public ref class ComponentChangedEventArgs sealed : EventArgs
public sealed class ComponentChangedEventArgs : EventArgs
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class ComponentChangedEventArgs : EventArgs
type ComponentChangedEventArgs = class
inherit EventArgs
[<System.Runtime.InteropServices.ComVisible(true)>]
type ComponentChangedEventArgs = class
inherit EventArgs
Public NotInheritable Class ComponentChangedEventArgs
Inherits EventArgs
- 繼承
- 屬性
下列範例示範如何建立 ComponentChangedEventArgs。
public:
// This example method creates a ComponentChangedEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.
ComponentChangedEventArgs^ CreateComponentChangedEventArgs( Object^ component, MemberDescriptor^ member, Object^ oldValue, Object^ newValue )
{
// Creates a component changed event args with the specified arguments.
ComponentChangedEventArgs^ args = gcnew ComponentChangedEventArgs( component, member, oldValue, newValue );
// The component that has changed: args->Component
// The member of the component that changed: args->Member
// The old value of the member: args->oldValue
// The new value of the member: args->newValue
return args;
}
// This example method creates a ComponentChangedEventArgs using the specified arguments.
// Typically, this type of event args is created by a design mode subsystem.
public ComponentChangedEventArgs CreateComponentChangedEventArgs(object component, MemberDescriptor member, object oldValue, object newValue)
{
// Creates a component changed event args with the specified arguments.
ComponentChangedEventArgs args = new ComponentChangedEventArgs(component, member, oldValue, newValue);
// The component that has changed: args.Component
// The member of the component that changed: args.Member
// The old value of the member: args.oldValue
// The new value of the member: args.newValue
return args;
}
' This example method creates a ComponentChangedEventArgs using the specified arguments.
' Typically, this type of event args is created by a design mode subsystem.
Public Function CreateComponentChangedEventArgs(ByVal component As Object, ByVal member As MemberDescriptor, ByVal oldValue As Object, ByVal newValue As Object) As ComponentChangedEventArgs
' Creates a component changed event args with the specified arguments.
Dim args As New ComponentChangedEventArgs(component, member, oldValue, newValue)
' The component that has changed: args.Component
' The member of the component that changed: args.Member
' The old value of the member: args.oldValue
' The new value of the member: args.newValue
Return args
End Function
ComponentChangedEventArgs 提供事件的數據 ComponentChanged 。 事件 ComponentChanged 會 IComponentChangeService 通知 和 已註冊的事件處理程式,目前使用中檔的特定元件已變更。
提供 ComponentChangedEventArgs 下列資訊:
元件設計工具通常會在新增、移除或修改元件時自動引發 ComponentChanged 事件。 ComponentChanged表單載入和卸除期間不會引發事件,因為目前預期會有變更。 元件設計工具可能會在變更元件的 屬性之後引發 ComponentChanged 事件;這可確保 屬性視窗 會顯示更新的屬性。
如果這個類別指定為另一個類別的基類,就會發生編譯程序錯誤。
Component |
初始化 ComponentChangedEventArgs 類別的新執行個體。 |
Equals(Object) |
判斷指定的物件是否等於目前的物件。 (繼承來源 Object) |
Get |
做為預設雜湊函式。 (繼承來源 Object) |
Get |
取得目前執行個體的 Type。 (繼承來源 Object) |
Memberwise |
建立目前 Object 的淺層複製。 (繼承來源 Object) |
To |
傳回代表目前物件的字串。 (繼承來源 Object) |
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |