procedure TForm1.dxBarManagerToDxNavBar;
var
i, j: Integer;
item: TdxBarSubItem;
group: TdxNavBarGroup;
bar: TdxNavBarItem;
begin
dxNavBar1.Groups.Clear;
for i := 0 to dxBarManager1Bar1.ItemLinks.Count - 1 do
begin
item := TdxBarSubItem(dxBarManager1Bar1.ItemLinks[i].Control.Item);
group := dxNavBar1.Groups.Add;
group.Caption := item.Caption;
for j := 0 to item.ItemLinks.Count - 1 do
begin
bar := dxNavBar1.Items.Add;
bar.Caption := item.ItemLinks.Items[j].Caption;
bar.OnClick := dxNavBarItemClick;
bar.SmallImageIndex := 0;
group.CreateLink(bar);
end;
end;
end;