Пример #1
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;
        }
        /// <summary>
        /// Initialize a new instance of the ViewLayoutBar class.
        /// </summary>
        /// <param name="paletteMetric">Palette source for metric values.</param>
        /// <param name="metricGap">Metric for gap between each child item.</param>
        /// <param name="itemSizing">Method used to calculate item size.</param>
        /// <param name="itemAlignment">Method used to align items within lines.</param>
        /// <param name="barMultiline">Multline showing of items.</param>
        /// <param name="itemMinimumSize">Maximum allowed item size.</param>
        /// <param name="itemMaximumSize">Minimum allowed item size.</param>
        /// <param name="barMinimumHeight">Minimum height of the bar.</param>
        /// <param name="tabBorderStyle">Tab border style.</param>
        /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
        public ViewLayoutBar(IPaletteMetric paletteMetric,
                             PaletteMetricInt metricGap,
                             BarItemSizing itemSizing,
                             RelativePositionAlign itemAlignment,
                             BarMultiline barMultiline,
                             Size itemMinimumSize,
                             Size itemMaximumSize,
                             int barMinimumHeight,
                             TabBorderStyle tabBorderStyle,
                             bool reorderSelectedLine)
        {
            // Remember the source information
            _paletteMetric      = paletteMetric;
            _metricGap          = metricGap;
            BarItemSizing       = itemSizing;
            ItemAlignment       = itemAlignment;
            ItemMinimumSize     = itemMinimumSize;
            ItemMaximumSize     = itemMaximumSize;
            BarMinimumHeight    = barMinimumHeight;
            TabBorderStyle      = tabBorderStyle;
            BarMultiline        = barMultiline;
            ReorderSelectedLine = reorderSelectedLine;

            // Default other state
            Orientation     = VisualOrientation.Top;
            ItemOrientation = VisualOrientation.Top;
        }
 /// <summary>
 /// Initialize a new instance of the ViewLayoutBarForTabs class.
 /// </summary>
 /// <param name="itemSizing">Method used to calculate item size.</param>
 /// <param name="itemAlignment">Method used to align items within lines.</param>
 /// <param name="barMultiline">Multline showing of items.</param>
 /// <param name="itemMinimumSize">Maximum allowed item size.</param>
 /// <param name="itemMaximumSize">Minimum allowed item size.</param>
 /// <param name="barMinimumHeight">Minimum height of the bar.</param>
 /// <param name="tabBorderStyle">Tab border style.</param>
 /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
 public ViewLayoutBarForTabs(BarItemSizing itemSizing,
                             RelativePositionAlign itemAlignment,
                             BarMultiline barMultiline,
                             Size itemMinimumSize,
                             Size itemMaximumSize,
                             int barMinimumHeight,
                             TabBorderStyle tabBorderStyle,
                             bool reorderSelectedLine)
     : base(itemSizing, itemAlignment, barMultiline, itemMinimumSize,
            itemMaximumSize, barMinimumHeight, tabBorderStyle, reorderSelectedLine)
 {
 }
Пример #4
0
 /// <summary>
 /// Initialize a new instance of the ViewLayoutBarForTabs class.
 /// </summary>
 /// <param name="itemSizing">Method used to calculate item size.</param>
 /// <param name="itemAlignment">Method used to align items within lines.</param>
 /// <param name="barMultiline">Multline showing of items.</param>
 /// <param name="itemMinimumSize">Maximum allowed item size.</param>
 /// <param name="itemMaximumSize">Minimum allowed item size.</param>
 /// <param name="barMinimumHeight">Minimum height of the bar.</param>
 /// <param name="tabBorderStyle">Tab border style.</param>
 /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
 public ViewLayoutBarForTabs(BarItemSizing itemSizing,
                             RelativePositionAlign itemAlignment,
                             BarMultiline barMultiline,
                             Size itemMinimumSize,
                             Size itemMaximumSize,
                             int barMinimumHeight,
                             TabBorderStyle tabBorderStyle,
                             bool reorderSelectedLine)
     : base(itemSizing, itemAlignment, barMultiline, itemMinimumSize,
            itemMaximumSize, barMinimumHeight, tabBorderStyle, reorderSelectedLine)
 {
 }
 /// <summary>
 /// Initialize a new instance of the ViewLayoutBar class.
 /// </summary>
 /// <param name="itemSizing">Method used to calculate item size.</param>
 /// <param name="itemAlignment">Method used to align items within lines.</param>
 /// <param name="barMultiline">Multline showing of items.</param>
 /// <param name="itemMinimumSize">Maximum allowed item size.</param>
 /// <param name="itemMaximumSize">Minimum allowed item size.</param>
 /// <param name="barMinimumHeight">Minimum height of the bar.</param>
 /// <param name="tabBorderStyle">Tab border style.</param>
 /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
 public ViewLayoutBar(BarItemSizing itemSizing,
                      RelativePositionAlign itemAlignment,
                      BarMultiline barMultiline,
                      Size itemMinimumSize,
                      Size itemMaximumSize,
                      int barMinimumHeight,
                      TabBorderStyle tabBorderStyle,
                      bool reorderSelectedLine)
     : this(null, PaletteMetricInt.None, itemSizing,
            itemAlignment, barMultiline, itemMinimumSize,
            itemMaximumSize, barMinimumHeight, tabBorderStyle,
            reorderSelectedLine)
 {
 }
Пример #6
0
 /// <summary>
 /// Initialize a new instance of the ViewLayoutBar class.
 /// </summary>
 /// <param name="itemSizing">Method used to calculate item size.</param>
 /// <param name="itemAlignment">Method used to align items within lines.</param>
 /// <param name="barMultiline">Multline showing of items.</param>
 /// <param name="itemMinimumSize">Maximum allowed item size.</param>
 /// <param name="itemMaximumSize">Minimum allowed item size.</param>
 /// <param name="barMinimumHeight">Minimum height of the bar.</param>
 /// <param name="tabBorderStyle">Tab border style.</param>
 /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
 public ViewLayoutBar(BarItemSizing itemSizing,
                      RelativePositionAlign itemAlignment,
                      BarMultiline barMultiline,
                      Size itemMinimumSize,
                      Size itemMaximumSize,
                      int barMinimumHeight,
                      TabBorderStyle tabBorderStyle,
                      bool reorderSelectedLine)
     : this(null, PaletteMetricInt.None, itemSizing, 
            itemAlignment, barMultiline, itemMinimumSize, 
            itemMaximumSize, barMinimumHeight, tabBorderStyle,
            reorderSelectedLine)
 {
 }
 /// <summary>
 /// Initialize a new instance of the ViewLayoutBar class.
 /// </summary>
 /// <param name="paletteMetric">Palette source for metric values.</param>
 /// <param name="metricGap">Metric for gap between each child item.</param>
 /// <param name="itemSizing">Method used to calculate item size.</param>
 /// <param name="itemAlignment">Method used to align items within lines.</param>
 /// <param name="barMultiline">Multline showing of items.</param>
 /// <param name="itemMinimumSize">Maximum allowed item size.</param>
 /// <param name="itemMaximumSize">Minimum allowed item size.</param>
 /// <param name="barMinimumHeight">Minimum height of the bar.</param>
 /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
 public ViewLayoutBar(IPaletteMetric paletteMetric,
                      PaletteMetricInt metricGap,
                      BarItemSizing itemSizing,
                      RelativePositionAlign itemAlignment,
                      BarMultiline barMultiline,
                      Size itemMinimumSize,
                      Size itemMaximumSize,
                      int barMinimumHeight,
                      bool reorderSelectedLine)
     : this(paletteMetric, metricGap, itemSizing,
            itemAlignment, barMultiline, itemMinimumSize,
            itemMaximumSize, barMinimumHeight,
            TabBorderStyle.RoundedOutsizeMedium,
            reorderSelectedLine)
 {
 }
Пример #8
0
 /// <summary>
 /// Resets the BarMultiline property to its default value.
 /// </summary>
 public void ResetBarMultiline()
 {
     BarMultiline = BarMultiline.Singleline;
 }
Пример #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;
        }
Пример #10
0
 /// <summary>
 /// Initialize a new instance of the ViewLayoutBar class.
 /// </summary>
 /// <param name="paletteMetric">Palette source for metric values.</param>
 /// <param name="metricGap">Metric for gap between each child item.</param>
 /// <param name="itemSizing">Method used to calculate item size.</param>
 /// <param name="itemAlignment">Method used to align items within lines.</param>
 /// <param name="barMultiline">Multline showing of items.</param>
 /// <param name="itemMinimumSize">Maximum allowed item size.</param>
 /// <param name="itemMaximumSize">Minimum allowed item size.</param>
 /// <param name="barMinimumHeight">Minimum height of the bar.</param>
 /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
 public ViewLayoutBar(IPaletteMetric paletteMetric,
                      PaletteMetricInt metricGap,
                      BarItemSizing itemSizing,
                      RelativePositionAlign itemAlignment,
                      BarMultiline barMultiline,
                      Size itemMinimumSize,
                      Size itemMaximumSize,
                      int barMinimumHeight,
                      bool reorderSelectedLine)
     : this(paletteMetric, metricGap, itemSizing, 
            itemAlignment, barMultiline, itemMinimumSize, 
            itemMaximumSize, barMinimumHeight, 
            TabBorderStyle.RoundedOutsizeMedium,
            reorderSelectedLine)
 {
 }
Пример #11
0
        /// <summary>
        /// Initialize a new instance of the ViewLayoutBar class.
        /// </summary>
        /// <param name="paletteMetric">Palette source for metric values.</param>
        /// <param name="metricGap">Metric for gap between each child item.</param>
        /// <param name="itemSizing">Method used to calculate item size.</param>
        /// <param name="itemAlignment">Method used to align items within lines.</param>
        /// <param name="barMultiline">Multline showing of items.</param>
        /// <param name="itemMinimumSize">Maximum allowed item size.</param>
        /// <param name="itemMaximumSize">Minimum allowed item size.</param>
        /// <param name="barMinimumHeight">Minimum height of the bar.</param>
        /// <param name="tabBorderStyle">Tab border style.</param>
        /// <param name="reorderSelectedLine">Should line with selection be reordered.</param>
        public ViewLayoutBar(IPaletteMetric paletteMetric,
                             PaletteMetricInt metricGap,
                             BarItemSizing itemSizing,
                             RelativePositionAlign itemAlignment,
                             BarMultiline barMultiline,
                             Size itemMinimumSize,
                             Size itemMaximumSize,
                             int barMinimumHeight,
                             TabBorderStyle tabBorderStyle,
                             bool reorderSelectedLine)
        {
            // Remember the source information
            _paletteMetric = paletteMetric;
            _metricGap = metricGap;
            _itemSizing = itemSizing;
            _itemAlignment = itemAlignment;
            _itemMinimumSize = itemMinimumSize;
            _itemMaximumSize = itemMaximumSize;
            _barMinimumHeight = barMinimumHeight;
            _tabBorderStyle = tabBorderStyle;
            _barMultiline = barMultiline;
            _reorderSelectedLine = reorderSelectedLine;

            // Default other state
            _orientation = VisualOrientation.Top;
            _itemOrientation = VisualOrientation.Top;
        }