Exemplo n.º 1
0
        public void Mount(IRoloMenu menu)
        {
            ResetView();
            Menu = menu;
            if (Menu == null)
            {
                return;
            }

            CloseVisibility.SetVisibility(Menu.CanClose);
            AddMenuPath(menu);

            foreach (var element in Menu.Items)
            {
                AddElement(element);
            }

            Div.UpdatePosition(true);
        }
Exemplo n.º 2
0
        private void ResetView()
        {
            foreach (var view in MenuPath)
            {
                HeaderDiv.RemoveChild(view.Panel);
                view.Dismount();
            }

            MenuPath.Clear();

            foreach (var view in Elements)
            {
                ElementParent.RemoveChild(view.Panel);
                view.Dismount();
            }

            Elements.Clear();
            CloseVisibility.Hide();

            Menu = null;
        }