public NavBarGroup GenerateNavBarGroup(NavBarGroups model)
        {
            var nav = new NavBarGroup
            {
                DisplayMode = DisplayMode.ImageAndText,
                Header      = model.Name,
                ImageSource = new BitmapImage(new Uri($"{AppDomain.CurrentDomain.BaseDirectory}{model.Ico}")),
                DataContext = model
            };

            nav.Activate += (sender, e) => NavBarGroupActivate?.Invoke(sender, e);
            return(nav);
        }
        private void Init()
        {
            var navBarGroupsList = _barGroupsManage.GetAll().ToList();

            navBarGroupsList.ForEach(a => {
                var treeView = new CTreeView(a.Id, LeftMenusList)
                {
                    BorderThickness = new Thickness(0)
                };
                treeView.ChildItemSelected  += (sender, e) => ChildItemSelected?.Invoke(sender, e);
                treeView.ParentItemSelected += (sender, e) => ParentItemSelected?.Invoke(sender, e);
                var navBarGroup              = new NavBarGroup
                {
                    DisplayMode = DisplayMode.ImageAndText,
                    Header      = a.Name,
                    ImageSource = GetNavBarGroupImageSource(a.Ico),
                    DataContext = a
                };
                navBarGroup.Activate += (sender, e) => NavBarGroupActivate?.Invoke(sender, e);
                navBarGroup.Items.Add(treeView);
                NavBarControlMain.Groups.Add(navBarGroup);
            });
        }