The requested page is not available for the requested platform. You are viewing the content for Default platform.

ModelDefaultAttribute Class

Specifies default settings that are considered when generating the Application Model node related to the target.

Namespace: DevExpress.ExpressApp.Model

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, Inherited = true, AllowMultiple = true)]
public sealed class ModelDefaultAttribute :
    Attribute
<AttributeUsage(AttributeTargets.Class Or AttributeTargets.Property Or AttributeTargets.Field Or AttributeTargets.Interface, Inherited:=True, AllowMultiple:=True)>
Public NotInheritable Class ModelDefaultAttribute
    Inherits Attribute

Remarks

  • When applied to a business class, specifies the default value of the Application Model's BOModel | <Class> node property.
  • When applied to a business class' member, specifies the default value of the Application Model's BOModel | <Class> | OwnMembers | <Member> node property.

The ModelDefaultAttribute.PropertyName parameter specifies the property name, and the ModelDefaultAttribute.PropertyValue specifies the string representation of the default value.

using DevExpress.ExpressApp.Model;
// ...
[ModelDefault("Caption", "Task")]
public class DemoTask : Task {
    // ...
}

The code above specifies that the Caption property of the BOModel | DemoTask node is set to "Task", by default. If you customize this value in the Model Editor and later reset this customization, the value will be "Task" again.

Inheritance

Object
Attribute
ModelDefaultAttribute
See Also