示例#1
0
 public override void InitializeChildControlStructure()
 {
     if (menuItem.MenuItems.Count > 0)
     {
         menuProvider = new MenuItemMenuProvider(menuItem);
         menuProvider.Initialize();
         AddChildProvider(menuProvider);
     }
 }
示例#2
0
        private void OnMenuChanged(object sender, EventArgs args)
        {
            if (menuProvider == null && menuItem.MenuItems.Count > 0)
            {
                menuProvider = new MenuItemMenuProvider(menuItem);
                menuProvider.Initialize();
                AddChildProvider(menuProvider);
            }
            else if (menuProvider != null && menuItem.MenuItems.Count == 0)
            {
                menuProvider.Terminate();
                RemoveChildProvider(menuProvider);
                OnNavigationChildrenCleared();
                menuProvider = null;
            }

            UpdateBehaviors();
        }
示例#3
0
		private void OnMenuChanged (object sender, EventArgs args)
		{
			if (menuProvider == null && menuItem.MenuItems.Count > 0) {
				menuProvider = new MenuItemMenuProvider (menuItem);
				menuProvider.Initialize ();
				AddChildProvider (menuProvider);
			} else if (menuProvider != null && menuItem.MenuItems.Count == 0) {
				menuProvider.Terminate ();
				RemoveChildProvider (menuProvider);
				OnNavigationChildrenCleared ();
				menuProvider = null;
			}
			
			UpdateBehaviors ();
		}
示例#4
0
		public override void InitializeChildControlStructure ()
		{
			if (menuItem.MenuItems.Count > 0) {
				menuProvider = new MenuItemMenuProvider (menuItem);
				menuProvider.Initialize ();
				AddChildProvider (menuProvider);
			}
		}