ComponentFactory.Krypton.Ribbon.ButtonSpecMdiChildRestore.GetVisible C# (CSharp) Method

GetVisible() public method

Gets the button visible value.
public GetVisible ( IPalette palette ) : bool
palette IPalette Palette to use for inheriting values.
return bool
        public override bool GetVisible(IPalette palette)
        {
            // Cannot be seen if not attached to an mdi child window and cannot be seen
            // if the window is not maximized and so needing the pendant buttons
            if ((MdiChild == null) || !CommonHelper.IsFormMaximized(MdiChild))
                return false;

            // The maximize button is never present on tool windows
            switch (MdiChild.FormBorderStyle)
            {
                case FormBorderStyle.FixedToolWindow:
                case FormBorderStyle.SizableToolWindow:
                    return false;
            }

            // Have all buttons been turned off?
            if (!MdiChild.ControlBox)
                return false;

            // Has the minimize/maximize buttons been turned off?
            if (!MdiChild.MinimizeBox && !MdiChild.MaximizeBox)
                return false;

            return true;
        }