How to use armnavigation controller

StatusIDPriorityType
Closed39024MajorQuestion
ProfileReply
sezzipatClient

I work love to migrate the provided contoller to arm navigation treelist

public interface IModelNavigationItemExtender : IModelNode
{
[DefaultValue(false)] bool ExpandChildItems { get; set; }
}

public class WinCustomizeNavBarController : WindowController
{
protected override void OnActivated()
{
base.OnActivated();
Frame.GetController().ShowNavigationItemAction.CustomizeControl += ShowNavigationItemAction_CustomizeControl;
}
private void ShowNavigationItemAction_CustomizeControl(object sender, DevExpress.ExpressApp.Actions.CustomizeControlEventArgs e)
{
NavBarNavigationControl navBar = e.Control as NavBarNavigationControl;
if (navBar != null)
{
foreach (NavBarGroup navGroup in navBar.Groups)
{
if (navGroup.ControlContainer != null)
{
TreeListNavigationControl treeList = (TreeListNavigationControl)navGroup.ControlContainer.Controls[0];
foreach (TreeListNode node in treeList.GetAllNodes())
{
ChoiceActionItem navigationActionItem = (ChoiceActionItem)node.Tag;
if (navigationActionItem.Model is IModelNavigationItemExtender)
{
node.Expanded = ((IModelNavigationItemExtender)navigationActionItem.Model).ExpandChildItems;
}
}
}
}
}
}
protected override void OnDeactivated()
{
Frame.GetController().ShowNavigationItemAction.CustomizeControl -= ShowNavigationItemAction_CustomizeControl;
base.OnDeactivated();
}
}

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello!

If you go to use Arm Navigation in your project, you need to configure the arm menu in the Model Editor.
See the documentation Alternative Navigation Items

If you want to copy Navigation Items from DevExpress navigation to arm navigation, copying the navigation in the controller is not suitable for you (when you use arm navigation, the DevExpress NavigationController is not activated).
Perhaps you can copy the navigation using the model updater. See Extend and Customize the Application Model in Code

Feel free to contact us if you need further assistance or have additional questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

× This ticket is closed.

Write US