protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); // set SubMenuCore default values SubMenuCore.SettingCategory = SettingCategory + "SubMenuControl"; SubMenuCore.Setup(); SubMenuCore.GenerateMenu(); // get visiblilty var isSubMenuVisible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.ControlVisible, SubMenuCore.SettingCategory); var isSearchControlVisible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.ControlVisible, SearchFilterCore.SettingCategory); var isBreadCrumbVisible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.ControlVisible, BreadCrumbObject.SettingCategory); // set visibility SearchFilterCore.Visible = isSearchControlVisible; SubMenuCore.Visible = isSubMenuVisible; BreadCrumbObject.Visible = isBreadCrumbVisible; // update custom visivblity control VisibilityManagerCore.ClearChildMenuItems(); VisibilityManagerCore.AddChildControl(SearchFilterCore.Title, isSearchControlVisible); VisibilityManagerCore.AddChildControl(SubMenuCore.Title, isSubMenuVisible); VisibilityManagerCore.AddChildControl("Bread Crumb", isBreadCrumbVisible); BreadCrumbObject.IsAddedInVisibilityManager = true; }
protected override void OnPreRender(EventArgs e) { base.OnPreRender(e); var sbm = Master.SubMenuObject; sbm.SettingCategory = SettingCategory + "SubMenuControl"; sbm.Setup(); sbm.GenerateMenu(); var bcControl = Master.BreadCrumbObject; bcControl.SettingCategory = SettingCategory + "BreadCrumbControl"; bcControl.Setup(string.Empty); bcControl.GenerateMenu(); VisibilityManagerCore = oVC; var isSubMenuVisible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.ControlVisible, sbm.SettingCategory); var isSearchControlVisible = PerferenceUtility.GetUserPreferenceByKeyAsBoolean(ApplicationCommon.ControlVisible, oSearchFilter.SearchControl.SettingCategory); // set visibility oSearchFilter.Visible = isSearchControlVisible; sbm.Visible = isSubMenuVisible; VisibilityManagerCore.ClearChildMenuItems(); VisibilityManagerCore.AddChildControl(oSearchFilter.SearchControl.Title, isSearchControlVisible); VisibilityManagerCore.AddChildControl(sbm.Title, isSubMenuVisible); // bccontrol.SettingCategory = SettingCategory + "BreadCrumbControl"; // bccontrol.Setup(""); // bccontrol.GenerateMenu(); }