MetadataLocator.Create() Method
Creates a metadata locator instance.
Namespace: DevExpress.Mvvm.DataAnnotations
Assembly: DevExpress.Mvvm.v18.2.dll
Declaration
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