Navigator view element for drawing a tab check button for a krypton page.
Inheritance: ViewDrawNavCheckButtonBar
        /// <summary>
        /// Update the state objects with the latest tab style.
        /// </summary>
        protected void UpdateTabStyle()
        {
            Navigator.StateCommon.Tab.SetStyles(Navigator.Bar.TabStyle);
            Navigator.OverrideFocus.Tab.SetStyles(Navigator.Bar.TabStyle);

            // Update each individual tab with the new style for remapping page level button specs
            if (PageLookup != null)
            {
                foreach (KeyValuePair <KryptonPage, INavCheckItem> pair in PageLookup)
                {
                    ViewDrawNavCheckButtonTab tabHeader = (ViewDrawNavCheckButtonTab)pair.Value;
                    tabHeader.ButtonSpecManager?.SetRemapTarget(Navigator.Bar.TabStyle);
                }
            }
        }
        /// <summary>
        /// Create a new check item with initial settings.
        /// </summary>
        /// <param name="page">Page for which the check button is to be created.</param>
        /// <param name="orientation">Initial orientation of the check button.</param>
        protected override INavCheckItem CreateCheckItem(KryptonPage page,
                                                         VisualOrientation orientation)
        {
            // Create a check button view element
            ViewDrawNavCheckButtonTab checkButton = new ViewDrawNavCheckButtonTab(Navigator, page, orientation);

            // Convert the button orientation to the appropriate visual orientations
            VisualOrientation orientBackBorder = ConvertButtonBorderBackOrientation();
            VisualOrientation orientContent    = ConvertButtonContentOrientation();

            // Set the correct initial orientation of the button
            checkButton.SetOrientation(orientBackBorder, orientContent);

            // Draw the border in a tab style
            checkButton.DrawTabBorder = true;

            // Define the style of tab border
            checkButton.TabBorderStyle = Navigator.Bar.TabBorderStyle;

            return(checkButton);
        }
Beispiel #3
0
        /// <summary>
        /// Create a new check item with initial settings.
        /// </summary>
        /// <param name="page">Page for which the check button is to be created.</param>
        /// <param name="orientation">Initial orientation of the check button.</param>
        protected override INavCheckItem CreateCheckItem(KryptonPage page,
            VisualOrientation orientation)
        {
            // Create a check button view element
            ViewDrawNavCheckButtonTab checkButton = new ViewDrawNavCheckButtonTab(Navigator, page, orientation);

            // Convert the button orientation to the appropriate visual orientations
            VisualOrientation orientBackBorder = ConvertButtonBorderBackOrientation();
            VisualOrientation orientContent = ConvertButtonContentOrientation();

            // Set the correct initial orientation of the button
            checkButton.SetOrientation(orientBackBorder, orientContent);

            // Draw the border in a tab style
            checkButton.DrawTabBorder = true;

            // Define the style of tab border
            checkButton.TabBorderStyle = Navigator.Bar.TabBorderStyle;

            return checkButton;
        }