Exemplo n.º 1
0
        void OnIdle(object sender, EventArgs e)
        {
            //Make sure ribbon manager is available

            if (Autodesk.Windows.ComponentManager.Ribbon != null)
            {
                //Create tab if it doesn't exist

                if (_ctxTab == null)
                {
                    CreateCtxTab();
                }

                //Otherwise make it visible

                if (!_ctxTab.IsVisible)
                {
                    Autodesk.Windows.RibbonControl ribbonCtrl = Autodesk.Windows.ComponentManager.Ribbon;

                    ribbonCtrl.ShowContextualTab(_ctxTab, false, true);

                    _ctxTab.IsActive = true;
                }

                if (!_ctxTab.IsActive)
                {
                    _ctxTab.IsActive = true;
                }
            }
        }