Skip to main content
.NET Framework 4.5.2+

NavigationItemAttribute Class

Specifies whether a class will have a corresponding item in the navigation control.

Namespace: DevExpress.Persistent.Base

Assembly: DevExpress.ExpressApp.v22.2.dll

NuGet Package: DevExpress.ExpressApp


[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
public class NavigationItemAttribute :


Each application built via the eXpressApp Framework has a navigation control on the main window, by default. This control is a part of the Navigation System. The control represents the ShowNavigationItem Action, and the control’s items represent the Action’s items. This Action allows end-users to display the required Views on the main window:


The Navigation Action’s items are added from the Application Model‘s IModelRootNavigationItems node. This node’s items are created either manually via the Model Editor, or in code via the NavigationItem attribute applied to the required business class. The attribute’s NavigationItemAttribute.IsNavigationItem property must be set to true.

To specify the navigation item within the navigation control, specify the NavigationItemAttribute.GroupName attribute. By default, an item is added to the default item specified by the NavigationItemAttribute.DefaultGroupName property.

If the NavigationItemAttribute.IsNavigationItem property is set to false, or if this attribute is not applied, the ShowNavigationItem Action item list will not have the corresponding item.

In the example below, the NavigationItem attribute is applied to the TestContact class. As a result, the Test Contact item is added to the specified MyContacts navigation item in the navigation control (see the image above).

public class TestContact : BaseObject {
    public virtual string Name { get; set; }

// Make sure that you use options.UseChangeTrackingProxies() in your DbContext settings.

When you need to apply the CreatableItemAttribute and VisibleInReportsAttribute attributes in addition to the NavigationItem attribute, it is easier to apply a single DefaultClassOptionsAttribute attribute.


See Also