ComponentFactory.Krypton.Ribbon.AppTabController.RemoveFixed C# (CSharp) Method

RemoveFixed() public method

Remove the fixed pressed mode.
public RemoveFixed ( ) : void
return void
        public void RemoveFixed()
        {
            if (_fixedPressed)
            {
                // Mouse no longer considered pressed down
                _mouseDown = false;

                // No longer in fixed state mode
                _fixedPressed = false;

                // Update appearance to reflect current state
                UpdateTargetState();
            }
        }

Usage Example

Ejemplo n.º 1
0
        private void OnAppMenuDisposed(object sender, EventArgs e)
        {
            // We always kill keyboard mode when the app button menu is removed
            _ribbon.KillKeyboardMode();

            // Remove the fixed 'pressed' state from the application button
            _appButtonController.RemoveFixed();
            _appTabController.RemoveFixed();

            // Should still be caching a reference to actual display control
            if (_appMenu != null)
            {
                // Unhook from control, so it can be garbage collected
                _appMenu.Disposed -= new EventHandler(OnAppMenuDisposed);

                // Discover the reason for the menu close
                ToolStripDropDownCloseReason closeReason = ToolStripDropDownCloseReason.AppFocusChange;
                if (_appMenu.CloseReason.HasValue)
                {
                    closeReason = _appMenu.CloseReason.Value;
                }

                // No longer need to cache reference
                _appMenu = null;

                // Notify event handlers the context menu has been closed and why it closed
                _ribbon.OnAppButtonMenuClosed(new ToolStripDropDownClosedEventArgs(closeReason));
            }
        }