public override void InitializeChildControlStructure() { if (menuItem.MenuItems.Count > 0) { menuProvider = new MenuItemMenuProvider(menuItem); menuProvider.Initialize(); AddChildProvider(menuProvider); } }
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(); }
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 (); }
public override void InitializeChildControlStructure () { if (menuItem.MenuItems.Count > 0) { menuProvider = new MenuItemMenuProvider (menuItem); menuProvider.Initialize (); AddChildProvider (menuProvider); } }