Skip to main content
A newer version of this page is available. .

PropertyDefinitionBase.InstanceInitializer Property

Gets or sets the instance initializer. This is a dependency property.

Namespace: DevExpress.Xpf.PropertyGrid

Assembly: DevExpress.Xpf.PropertyGrid.v22.2.dll

NuGet Package: DevExpress.Wpf.PropertyGrid

Declaration

public IInstanceInitializer InstanceInitializer { get; set; }

Property Value

Type Description
DevExpress.Mvvm.Native.IInstanceInitializer

An object implementing the DevExpress.Mvvm.Native.IInstanceInitializer interface.

Remarks

Instance initializer provides the functionality to create objects of a class that does not contain the default constructor (without the parameters).

The PropertyGrid control supports adding new objects to collections using the collection editor. To pre-set certain properties for a new object or create an object without the default constructor, use the CollectionDefinition.NewItemInitializer property. Like PropertyDefinitionBase.InstanceInitializer, it should be set to an object that implements the DevExpress.Mvvm.Native.IInstanceInitializer interface.

View Example

<Application x:Class="pgrid_collection.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             StartupUri="MainWindow.xaml">
    <Application.Resources>

    </Application.Resources>
</Application>
See Also