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

MetadataLocator.Create() Method

Creates a metadata locator instance.

Namespace: DevExpress.Mvvm.DataAnnotations

Assembly: DevExpress.Mvvm.v18.2.dll

Declaration

public static MetadataLocator Create()

Returns

Type Description
MetadataLocator

The metadata locator instance.

Remarks

See the example below.


MetadataLocator.Default = MetadataLocator.Create()
    .AddMetadata<Metadata>();
public class Metadata {
    public static void BuildMetadata(MetadataBuilder<Employee> builder) {
        builder.Property(x => x.FullName).ReadOnly();
    }
    public static void BuildMetadata(MetadataBuilder<Team> builder) {
        builder.Property(x => x.Id).ReadOnly();
    }
}
See Also