/// <summary>
        /// Initialize a new instance of the NavigatorOutlook class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorOutlook(KryptonNavigator navigator,
                                NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create compound objects
            _full = new NavigatorOutlookFull(navigator, needPaint);
            _mini = new NavigatorOutlookMini(navigator, needPaint);

            // Default values
            _checkButtonStyle = ButtonStyle.NavigatorStack;
            _overflowButtonStyle = ButtonStyle.NavigatorOverflow;
            _borderEdgeStyle = PaletteBorderStyle.ControlClient;
            _orientation = Orientation.Vertical;
            _itemOrientation = ButtonOrientation.Auto;
            _headerSecondaryVisible = InheritBool.False;
            _textMoreButtons = _defaultMoreButtons;
            _textFewerButtons = _defaultFewerButtons;
            _textAddRemoveButtons = _defaultAddRemoveButtons;
            _showDropDownButton = true;
        }
        /// <summary>
        /// Initialize a new instance of the NavigatorOutlook class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorOutlook(KryptonNavigator navigator,
                                NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Create compound objects
            Full = new NavigatorOutlookFull(navigator, needPaint);
            Mini = new NavigatorOutlookMini(navigator, needPaint);

            // Default values
            _checkButtonStyle       = ButtonStyle.NavigatorStack;
            _overflowButtonStyle    = ButtonStyle.NavigatorOverflow;
            _borderEdgeStyle        = PaletteBorderStyle.ControlClient;
            _orientation            = Orientation.Vertical;
            _itemOrientation        = ButtonOrientation.Auto;
            _headerSecondaryVisible = InheritBool.False;
            TextMoreButtons         = DEFAULT_MORE_BUTTONS;
            TextFewerButtons        = DEFAULT_FEWER_BUTTONS;
            TextAddRemoveButtons    = DEFAULT_ADD_REMOVE_BUTTONS;
            _showDropDownButton     = true;
        }
Esempio n. 3
0
        /// <summary>
        /// Initialize a new instance of the NavigatorBar class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorBar(KryptonNavigator navigator,
                            NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _barAnimation      = true;
            _barFirstItemInset = 0;
            _barLastItemInset  = 0;
            _barOrientation    = VisualOrientation.Top;
            _barMinimumHeight  = _defaultBarMinimumHeight;
            _barMultiline      = BarMultiline.Singleline;
            _checkButtonStyle  = ButtonStyle.Standalone;
            _tabStyle          = TabStyle.HighProfile;
            _tabBorderStyle    = TabBorderStyle.RoundedOutsizeMedium;
            _itemAlignment     = RelativePositionAlign.Near;
            _itemMinimumSize   = _defaultItemMinimumSize;
            _itemMaximumSize   = _defaultItemMaximumSize;
            _itemOrientation   = ButtonOrientation.Auto;
            _itemSizing        = BarItemSizing.SameHeight;
            _barMapImage       = MapKryptonPageImage.Small;
            _barMapText        = MapKryptonPageText.TextTitle;
            _barMapExtraText   = MapKryptonPageText.None;
        }
Esempio n. 4
0
        /// <summary>
        /// Initialize a new instance of the KryptonGroupBox class.
        /// </summary>
        public KryptonGroupBox()
        {
            SetStyle(ControlStyles.SupportsTransparentBackColor | ControlStyles.OptimizedDoubleBuffer, true);

            // Set default values
            _captionStyle       = LabelStyle.GroupBoxCaption;
            _captionEdge        = VisualOrientation.Top;
            _captionOrientation = ButtonOrientation.Auto;
            _captionVisible     = true;

            // Create storage objects
            Values              = new CaptionValues(NeedPaintDelegate);
            Values.TextChanged += OnValuesTextChanged;

            // Create the palette storage
            StateCommon   = new PaletteGroupBoxRedirect(Redirector, NeedPaintDelegate);
            StateDisabled = new PaletteGroupBox(StateCommon, NeedPaintDelegate);
            StateNormal   = new PaletteGroupBox(StateCommon, NeedPaintDelegate);

            // Create the internal panel used for containing content
            Panel = new KryptonGroupBoxPanel(this, StateCommon, StateDisabled, StateNormal, OnGroupPanelPaint)
            {
                // Make sure the panel back style always mimics our back style
                PanelBackStyle = PaletteBackStyle.ControlGroupBox
            };

            _drawContent = new ViewDrawContent(StateNormal.Content, Values, VisualOrientation.Top);

            // Create view for the control border and background
            _drawDocker = new ViewDrawGroupBoxDocker(StateNormal.Back, StateNormal.Border);

            // Create the element that fills the remainder space and remembers fill rectangle
            _layoutFill = new ViewLayoutFill(Panel);

            // Add caption into the docker with initial dock edges defined
            _drawDocker.Add(_drawContent, ViewDockStyle.Top);
            _drawDocker.Add(_layoutFill, ViewDockStyle.Fill);

            // Create the view manager instance
            ViewManager = new ViewManager(this, _drawDocker);

            // We want to default to shrinking and growing (base class defaults to GrowOnly)
            AutoSizeMode = AutoSizeMode.GrowAndShrink;

            // Create the delegate used when we need to ensure obscurer is removed
            _removeObscurer = OnRemoveObscurer;

            // Need to prevent the AddInternal from causing a layout, otherwise the
            // layout will probably try to measure text which causes the handle for the
            // control to be created which means the handle is created at the wrong time
            // and so child controls are not added properly in the future! (for the TabControl
            // at the very least).
            _ignoreLayout = true;

            // Add panel to the controls collection
            ((KryptonReadOnlyControls)Controls).AddInternal(Panel);

            _ignoreLayout = false;
        }
        private VisualOrientation CalculateOrientation(VisualOrientation viewOrientation,
                                                       ButtonOrientation buttonOrientation)
        {
            switch (buttonOrientation)
            {
            case ButtonOrientation.FixedBottom:
                return(VisualOrientation.Bottom);

            case ButtonOrientation.FixedLeft:
                return(VisualOrientation.Left);

            case ButtonOrientation.FixedRight:
                return(VisualOrientation.Right);

            case ButtonOrientation.FixedTop:
                return(VisualOrientation.Top);

            case ButtonOrientation.Auto:
            default:
                return(viewOrientation);
            }
        }
Esempio n. 6
0
        /// <summary>
        /// Initialize a new instance of the NavigatorStack class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorStack(KryptonNavigator navigator,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _checkButtonStyle = ButtonStyle.NavigatorStack;
            _borderEdgeStyle = PaletteBorderStyle.ControlClient;
            _stackAnimation = true;
            _stackOrientation = Orientation.Vertical;
            _stackAlignment = RelativePositionAlign.Center;
            _itemOrientation = ButtonOrientation.Auto;
            _stackMapImage = MapKryptonPageImage.Small;
            _stackMapText = MapKryptonPageText.TextTitle;
            _stackMapExtraText = MapKryptonPageText.None;
        }
Esempio n. 7
0
        /// <summary>
        /// Initialize a new instance of the NavigatorStack class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorStack(KryptonNavigator navigator,
                              NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _checkButtonStyle  = ButtonStyle.NavigatorStack;
            _borderEdgeStyle   = PaletteBorderStyle.ControlClient;
            _stackAnimation    = true;
            _stackOrientation  = Orientation.Vertical;
            _stackAlignment    = RelativePositionAlign.Center;
            _itemOrientation   = ButtonOrientation.Auto;
            _stackMapImage     = MapKryptonPageImage.Small;
            _stackMapText      = MapKryptonPageText.TextTitle;
            _stackMapExtraText = MapKryptonPageText.None;
        }
Esempio n. 8
0
 /// <summary>
 /// Resets the ItemOrientation property to its default value.
 /// </summary>
 public void ResetItemOrientation()
 {
     ItemOrientation = ButtonOrientation.Auto;
 }
Esempio n. 9
0
        /// <summary>
        /// Initialize a new instance of the NavigatorBar class.
        /// </summary>
        /// <param name="navigator">Reference to owning navigator instance.</param>
        /// <param name="needPaint">Delegate for notifying paint requests.</param>
        public NavigatorBar(KryptonNavigator navigator,
                            NeedPaintHandler needPaint)
        {
            Debug.Assert(navigator != null);

            // Remember back reference
            _navigator = navigator;

            // Store the provided paint notification delegate
            NeedPaint = needPaint;

            // Default values
            _barAnimation = true;
            _barFirstItemInset = 0;
            _barLastItemInset = 0;
            _barOrientation = VisualOrientation.Top;
            _barMinimumHeight = _defaultBarMinimumHeight;
            _barMultiline = BarMultiline.Singleline;
            _checkButtonStyle = ButtonStyle.Standalone;
            _tabStyle = TabStyle.HighProfile;
            _tabBorderStyle = TabBorderStyle.RoundedOutsizeMedium;
            _itemAlignment = RelativePositionAlign.Near;
            _itemMinimumSize = _defaultItemMinimumSize;
            _itemMaximumSize = _defaultItemMaximumSize;
            _itemOrientation = ButtonOrientation.Auto;
            _itemSizing = BarItemSizing.SameHeight;
            _barMapImage = MapKryptonPageImage.Small;
            _barMapText = MapKryptonPageText.TextTitle;
            _barMapExtraText = MapKryptonPageText.None;
        }