Skip to main content
.NET Framework 4.5.2+

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.v22.2.dll

NuGet Package: DevExpress.ExpressApp


[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface, Inherited = true, AllowMultiple = true)]
public sealed class ModelDefaultAttribute :


  • 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 PropertyName parameter specifies the property name, and the PropertyValue specifies the string representation of the default value. Refer to the following topics to see available properties:

The code below sets the BOModel | DemoTask node’s Caption property to “Task” and ImageName - to “Tasks”. If you customize this value in the Model Editor and later reset this customization, the values will be “Task” and “Tasks” again.

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


See Also