MetadataLocator.Create() Method
Creates a metadata locator instance.
Namespace: DevExpress.Mvvm.DataAnnotations
Assembly: DevExpress.Mvvm.v24.1.dll
NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation
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