ComponentChangedEventArgs Osztály

Definíció

Adatokat biztosít az ComponentChanged eseményhez. Ez az osztály nem örökölhető.

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
Öröklődés
ComponentChangedEventArgs
Attribútumok

Példák

Az alábbi példa egy 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

Megjegyzések

ComponentChangedEventArgs adatokat biztosít egy ComponentChanged eseményhez. Az ComponentChanged esemény értesíti a IComponentChangeService regisztrált eseménykezelőket, hogy az aktuálisan aktív dokumentum egy adott összetevőjét módosították.

Az A ComponentChangedEventArgs a következő információkat nyújtja:

  • A Component módosított összetevőt jelző tulajdonság.

  • A Member módosított tagot jelző tulajdonság.

  • A NewValue tag új értékét jelző tulajdonság.

  • A OldValue tag régi értékét jelző tulajdonság.

Az összetevők tervezői általában automatikusan aktiválják az ComponentChanged eseményt az összetevők hozzáadásakor, eltávolításakor vagy módosításakor. Az ComponentChanged űrlap be- és kirakodása során nem történik esemény, mert jelenleg változások várhatók. Az összetevő-tervező a ComponentChanged eseményt az összetevő tulajdonságának módosítása után is előhozhatja; ez biztosítja, hogy a Tulajdonságok ablak megjelenítse a frissített tulajdonságot.

Megjegyzések az öröklőkhöz

Fordítóhiba akkor fordul elő, ha ez az osztály egy másik osztály alaposztályaként van megadva.

Konstruktorok

Name Description
ComponentChangedEventArgs(Object, MemberDescriptor, Object, Object)

Inicializálja a ComponentChangedEventArgs osztály új példányát.

Tulajdonságok

Name Description
Component

Lekéri a módosított összetevőt.

Member

Lekéri a módosított tagot.

NewValue

Lekéri a módosított tag új értékét.

OldValue

Lekéri a módosított tag régi értékét.

Metódusok

Name Description
Equals(Object)

Meghatározza, hogy a megadott objektum egyenlő-e az aktuális objektummal.

(Öröklődés forrása Object)
GetHashCode()

Ez az alapértelmezett kivonatoló függvény.

(Öröklődés forrása Object)
GetType()

Lekéri az Type aktuális példányt.

(Öröklődés forrása Object)
MemberwiseClone()

Az aktuális Objectpéldány sekély másolatát hozza létre.

(Öröklődés forrása Object)
ToString()

Az aktuális objektumot jelképező sztringet ad vissza.

(Öröklődés forrása Object)

A következőre érvényes:

Lásd még