Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DataAnnotationsModelMetadata Properties

.NET Framework 4.6 and 4.5

The DataAnnotationsModelMetadata type exposes the following members.

  Name Description
Public property AdditionalValues Gets a collection that contains additional metadata about the model. (Inherited from ModelMetadata.)
Public property ContainerType Gets the type of the container. (Inherited from ModelMetadata.)
Public property ConvertEmptyStringToNull Gets or sets a value that determines whether empty strings that are submitted in forms should be converted to null. (Inherited from ModelMetadata.)
Public property DataTypeName Gets or sets the name of the data type. (Inherited from ModelMetadata.)
Public property Description Gets or sets text that describes the model. (Inherited from ModelMetadata.)
Public property DisplayFormatString Gets or sets a format string that should be applied when the model is displayed in display mode (as opposed to in edit mode). (Inherited from ModelMetadata.)
Public property DisplayName Gets or sets the text to use in UI when the name of the model is displayed. (Inherited from ModelMetadata.)
Public property EditFormatString Gets or sets the format string to use in UI in edit mode. (Inherited from ModelMetadata.)
Public property HideSurroundingHtml Gets or sets a value that determines whether surrounding HTML should be hidden. (Inherited from ModelMetadata.)
Public property IsComplexType Gets a value that specifies whether the model is a complex type. (Inherited from ModelMetadata.)
Public property IsNullableValueType Gets a value that specifies whether the model is a nullable value type. (Inherited from ModelMetadata.)
Public property IsReadOnly Gets or sets a value that specifies whether the model can be updated. (Inherited from ModelMetadata.)
Public property IsRequired Gets or sets a value that specifies whether the property is required. (Inherited from ModelMetadata.)
Public property Model Gets or sets the model object. (Inherited from ModelMetadata.)
Public property ModelType Gets the type of the model. (Inherited from ModelMetadata.)
Public property NullDisplayText Gets the string that should be displayed when the model is null. (Inherited from ModelMetadata.)
Public property Order Gets or sets an integer that indicates the order in which to display this property relative to other properties. (Inherited from ModelMetadata.)
Public property Properties Gets a collection of model metadata objects that describe the properties of the model. (Inherited from ModelMetadata.)
Public property PropertyName Gets the name of the property. (Inherited from ModelMetadata.)
Protected property Provider Gets or sets the provider object for this metadata. (Inherited from ModelMetadata.)
Public property RequestValidationEnabled Gets or sets a value that specifies whether request validation is enabled. (Inherited from ModelMetadata.)
Public property ShortDisplayName Gets or sets a short version of the display name. (Inherited from ModelMetadata.)
Public property ShowForDisplay Gets or sets a value that specifies whether the model should be displayed in the UI in display mode (as opposed to edit mode). (Inherited from ModelMetadata.)
Public property ShowForEdit Gets or sets a value that specifies whether the property should be displayed in edit mode (as opposed to display mode). (Inherited from ModelMetadata.)
Public property SimpleDisplayText Gets or sets text to display for the model when the model represents a complex object (Inherited from ModelMetadata.)
Public property TemplateHint Gets or sets a value that indicates what template (data control) should be used in UI for the model. (Inherited from ModelMetadata.)
Public property Watermark Gets or sets watermark text for a text box. (Inherited from ModelMetadata.)
Top
Show:
© 2015 Microsoft