Skip to main content

MetadataBuilder<T>.Property<TProperty>(String) Method

Initializes a property metadata builder.

Namespace: DevExpress.Mvvm.DataAnnotations

Assembly: DevExpress.Mvvm.v23.2.dll

NuGet Packages: DevExpress.Mvvm, DevExpress.Win.Navigation

Declaration

public PropertyMetadataBuilder<T, TProperty> Property<TProperty>(
    string propertyName
)

Parameters

Name Type Description
propertyName String

The name of a ViewModel property.

Type Parameters

Name
TProperty

Returns

Type Description
PropertyMetadataBuilder<T, TProperty>

The property metadata builder instance.

Remarks

The Property<TProperty> property is recognized by the GridControl, TreeListControl, DataLayoutControl and PropertyGridControl.

See the example below.

void IMetadataProvider<DataAnnotations_FluentAPI>.BuildMetadata(MetadataBuilder<DataAnnotations_FluentAPI> builder) {
            builder.Property("StringProperty")
                .Required()
        }
See Also