Exportieren (0) Drucken
Alle erweitern

FreezableCollection.CreateInstanceCore-Methode

Creates a new instance of the FreezableCollection.

Namespace: System.Windows
Assembly: PresentationCore (in presentationcore.dll)

protected override Freezable CreateInstanceCore ()
protected Freezable CreateInstanceCore ()
protected override function CreateInstanceCore () : Freezable
Sie können diese Methoden nicht in XAML verwenden.

Rückgabewert

The new instance.

Do not call this method directly (except when calling base in an implementation). This method is called internally by CreateInstance, whenever a new instance of the Freezable is created.

Hinweise zur Implementierung: Every Freezable subclass must implement this method. Typical implementation is to simply call the class default constructor and return the result.

The following example shows a typical implementation of CreateInstanceCore.

public class MyFreezable : Freezable
{
    // Typical implementation of CreateInstanceCore
    protected override Freezable CreateInstanceCore()
    {
    
        return new MyFreezable();      
    }


    // ...
    // Other code for the MyFreezableClass.
    // ...
    
    
}


Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.

.NET Framework

Unterstützt in: 3.0
Anzeigen:
© 2015 Microsoft