Exemple #1
0
        public void Register(ActionBase action, NavigationStyle navigationStyle)
        {
            UnsubscribeFromCallbackStartupScriptRegistering();
            var disposable = _mainNavControl as IDisposable;

            if (disposable != null)
            {
                disposable.Dispose();
            }
            Controls.Clear();
            if (navigationStyle == NavigationStyle.NavBar)
            {
                CssClass += " NavBarLiteAC";
            }
            _mainNavControl = CreateNavigationControl(navigationStyle);
            _mainNavControl.Control.Unload += Control_Unload;
            SubscribeToCallbackStartupScriptRegistering();
            _mainNavControl.SetNavigationActionItems(((ChoiceActionBase)action).Items, (SingleChoiceAction)action);
            Controls.Add(_mainNavControl.Control);
            _singleChoiceAction = action as SingleChoiceAction;
        }
 public void Register(ActionBase action, NavigationStyle navigationStyle){
     UnsubscribeFromCallbackStartupScriptRegistering();
     var disposable = _mainNavControl as IDisposable;
     if (disposable != null){
         disposable.Dispose();
     }
     Controls.Clear();
     if (navigationStyle == NavigationStyle.NavBar){
         CssClass += " NavBarLiteAC";
     }
     _mainNavControl = CreateNavigationControl(navigationStyle);
     _mainNavControl.Control.Unload += Control_Unload;
     SubscribeToCallbackStartupScriptRegistering();
     _mainNavControl.SetNavigationActionItems(((ChoiceActionBase) action).Items, (SingleChoiceAction) action);
     Controls.Add(_mainNavControl.Control);
     _singleChoiceAction = action as SingleChoiceAction;
 }