Modifier

Partager via


ModelMetadata.GetSimpleDisplayText Method

Definition

Returns text to display for the model when the model represents a complex object.

protected:
 virtual System::String ^ GetSimpleDisplayText();
protected virtual string GetSimpleDisplayText ();
abstract member GetSimpleDisplayText : unit -> string
override this.GetSimpleDisplayText : unit -> string
Protected Overridable Function GetSimpleDisplayText () As String

Returns

The property value is derived by examining the following sequence of related values until a return value is found.

  1. If the SimpleDisplayText property value is not null, that value is returned.

  2. If the Model property is null, the NullDisplayText property value is returned.

  3. If an attempt to convert the Model property to a string returns null, an empty string is returned.

  4. If the string conversion of the Model property value is the same as the FullName property of the Model property type, that value is returned.

  5. If there are no properties in the Properties collection, an empty string is returned.

  6. If none of the preceding tests have returned a value, the return value comes from the first property in the Properties collection. If the Model property of the first property is null, the NullDisplayText property value is returned; otherwise the result of converting the first property's Model property to a string is returned.

Applies to