/// <summary> /// Initialize a new instance of the KryptonBreadCrumb class. /// </summary> public KryptonBreadCrumb() { // The bread crumb cannot take the focus SetStyle(ControlStyles.Selectable, false); // Set default values _selectedItem = null; _dropDownNavigaton = true; _buttonStyle = ButtonStyle.BreadCrumb; RootItem = new KryptonBreadCrumbItem("Root"); RootItem.PropertyChanged += OnCrumbItemChanged; AllowButtonSpecToolTips = false; AllowButtonSpecToolTipPriority = false; // Create storage objects ButtonSpecs = new BreadCrumbButtonSpecCollection(this); // Create the palette storage StateCommon = new PaletteBreadCrumbRedirect(Redirector, NeedPaintDelegate); StateDisabled = new PaletteBreadCrumbDoubleState(StateCommon, NeedPaintDelegate); StateNormal = new PaletteBreadCrumbDoubleState(StateCommon, NeedPaintDelegate); StateTracking = new PaletteBreadCrumbState(StateCommon, NeedPaintDelegate); StatePressed = new PaletteBreadCrumbState(StateCommon, NeedPaintDelegate); // Our view contains background and border with crumbs inside _layoutCrumbs = new ViewLayoutCrumbs(this, NeedPaintDelegate); _drawDocker = new ViewDrawDocker(StateNormal.Back, StateNormal.Border, null) { { _layoutCrumbs, ViewDockStyle.Fill } }; // Create the view manager instance ViewManager = new ViewManager(this, _drawDocker); // Create button specification collection manager _buttonManager = new ButtonSpecManagerDraw(this, Redirector, ButtonSpecs, null, new[] { _drawDocker }, new IPaletteMetric[] { StateCommon }, new[] { PaletteMetricInt.HeaderButtonEdgeInsetPrimary }, new[] { PaletteMetricPadding.None }, CreateToolStripRenderer, NeedPaintDelegate); // Create the manager for handling tooltips ToolTipManager = new ToolTipManager(); ToolTipManager.ShowToolTip += OnShowToolTip; ToolTipManager.CancelToolTip += OnCancelToolTip; _buttonManager.ToolTipManager = ToolTipManager; }
/// <summary> /// Initialize a new instance of the PaletteBreadCrumbDoubleState class. /// </summary> /// <param name="redirect">inheritance redirection instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteBreadCrumbDoubleState(PaletteBreadCrumbRedirect redirect, NeedPaintHandler needPaint) : base(redirect, needPaint) =>
/// <summary> /// Initialize a new instance of the PaletteBreadCrumbState class. /// </summary> /// <param name="redirect">inheritance redirection instance.</param> /// <param name="needPaint">Delegate for notifying paint requests.</param> public PaletteBreadCrumbState(PaletteBreadCrumbRedirect redirect, NeedPaintHandler needPaint) =>