DisplayMetadata Class

Summary

Display metadata details for a [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata]().

Syntax

public class DisplayMetadata

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ModelBinding.Metadata.DisplayMetadata

Properties

AdditionalValues()

Gets a set of additional values. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.AdditionalValues]()

Return type:System.Collections.Generic.IDictionary{System.Object,System.Object}
public IDictionary<object, object> AdditionalValues { get; }
ConvertEmptyStringToNull()

Gets or sets a value indicating whether or not empty strings should be treated as <c>null</c>. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ConvertEmptyStringToNull]()

Return type:System.Boolean
public bool ConvertEmptyStringToNull { get; set; }
DataTypeName()

Gets or sets the name of the data type. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.DataTypeName]()

Return type:System.String
public string DataTypeName { get; set; }
Description()

Gets or sets a delegate which is used to get a value for the model description. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.Description]().

Return type:System.Func{System.String}
public Func<string> Description { get; set; }
DisplayFormatString()

Gets or sets a display format string for the model. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.DisplayFormatString]()

Return type:System.String
public string DisplayFormatString { get; set; }
DisplayName()

Gets or sets a delegate delegate which is used to get a value for the display name of the model. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.DisplayName]().

Return type:System.Func{System.String}
public Func<string> DisplayName { get; set; }
EditFormatString()

Gets or sets an edit format string for the model. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.EditFormatString]()

Return type:System.String
public string EditFormatString { get; set; }
EnumDisplayNamesAndValues()

Gets the ordered display names and values of all [System.Enum]() values in [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ModelType]() or <c>Nullable.GetUnderlyingType(ModelType)</c>. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.EnumDisplayNamesAndValues]().

Return type:System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}}
public IEnumerable<KeyValuePair<string, string>> EnumDisplayNamesAndValues { get; set; }
EnumNamesAndValues()

Gets the names and values of all [System.Enum]() values in [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ModelType]() or <c>Nullable.GetUnderlyingType(ModelType)</c>. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.EnumNamesAndValues]().

Return type:System.Collections.Generic.IReadOnlyDictionary{System.String,System.String}
public IReadOnlyDictionary<string, string> EnumNamesAndValues { get; set; }
HasNonDefaultEditFormat()

Gets or sets a value indicating whether or not the model has a non-default edit format. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.HasNonDefaultEditFormat]()

Return type:System.Boolean
public bool HasNonDefaultEditFormat { get; set; }
HideSurroundingHtml()

Gets or sets a value indicating if the surrounding HTML should be hidden. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.HideSurroundingHtml]()

Return type:System.Boolean
public bool HideSurroundingHtml { get; set; }
HtmlEncode()

Gets or sets a value indicating if the model value should be HTML encoded. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.HtmlEncode]()

Return type:System.Boolean
public bool HtmlEncode { get; set; }
IsEnum()

Gets a value indicating whether [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ModelType]() or

<c>Nullable.GetUnderlyingType(ModelType)</c> is for an [System.Enum](). See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.IsEnum]().

Return type:System.Boolean
public bool IsEnum { get; set; }
IsFlagsEnum()

Gets a value indicating whether [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ModelType]() or

<c>Nullable.GetUnderlyingType(ModelType)</c> is for an [System.Enum]() with an associated [System.FlagsAttribute](). See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.IsFlagsEnum]().

Return type:System.Boolean
public bool IsFlagsEnum { get; set; }
NullDisplayText()

Gets or sets the text to display when the model value is null. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.NullDisplayText]()

Return type:System.String
public string NullDisplayText { get; set; }
Order()

Gets or sets the order. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.Order]()

Return type:System.Int32
public int Order { get; set; }
ShowForDisplay()

Gets or sets a value indicating whether or not to include in the model value in display. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ShowForDisplay]()

Return type:System.Boolean
public bool ShowForDisplay { get; set; }
ShowForEdit()

Gets or sets a value indicating whether or not to include in the model value in an editor. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.ShowForEdit]()

Return type:System.Boolean
public bool ShowForEdit { get; set; }
SimpleDisplayProperty()

Gets or sets a the property name of a model property to use for display. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.SimpleDisplayProperty]()

Return type:System.String
public string SimpleDisplayProperty { get; set; }
TemplateHint()

Gets or sets a hint for location of a display or editor template. See [Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata.TemplateHint]()

Return type:System.String
public string TemplateHint { get; set; }