/// <summary> /// Initializes the designer with the specified component. /// </summary> /// <param name="component">The IComponent to associate the designer with.</param> public override void Initialize(IComponent component) { // Validate the parameter reference if (component == null) { throw new ArgumentNullException(nameof(component)); } // Let base class do standard stuff base.Initialize(component); // The resizing handles around the control need to change depending on the // value of the AutoSize and AutoSizeMode properties. When in AutoSize you // do not get the resizing handles, otherwise you do. AutoResizeHandles = true; // Cast to correct type _breadCrumb = component as KryptonBreadCrumb; if (_breadCrumb != null) { // Hook into bread crumb events _breadCrumb.GetViewManager().MouseUpProcessed += OnBreadCrumbMouseUp; _breadCrumb.GetViewManager().DoubleClickProcessed += OnBreadCrumbDoubleClick; } // Get access to the design services _designerHost = (IDesignerHost)GetService(typeof(IDesignerHost)); _changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); _selectionService = (ISelectionService)GetService(typeof(ISelectionService)); // We need to know when we are being removed _changeService.ComponentRemoving += OnComponentRemoving; }
/// <summary> /// Initialize a new instance of the KryptonBreadCrumbActionList class. /// </summary> /// <param name="owner">Designer that owns this action list instance.</param> public KryptonBreadCrumbActionList(KryptonBreadCrumbDesigner owner) : base(owner.Component) { // Remember the bread crumb control instance _breadCrumb = owner.Component as KryptonBreadCrumb; // Cache service used to notify when a property has changed _service = (IComponentChangeService)GetService(typeof(IComponentChangeService)); }
/// <summary> /// Initialize a new instance of the ViewLayoutCrumbs class. /// </summary> /// <param name="kryptonBreadCrumb">Reference to owning bread crumb control.</param> /// <param name="needPaintDelegate">Delegate used to request repainting..</param> public ViewLayoutCrumbs(KryptonBreadCrumb kryptonBreadCrumb, NeedPaintHandler needPaintDelegate) { _kryptonBreadCrumb = kryptonBreadCrumb; _needPaintDelegate = needPaintDelegate; _crumbToButton = new CrumbToButton(); _buttonToCrumb = new ButtonToCrumb(); _showingContextMenu = false; CreateOverflowButton(); }
/// <summary> /// Initialize a new instance of the BreadCrumbButtonSpecCollection class. /// </summary> /// <param name="owner">Reference to owning object.</param> public BreadCrumbButtonSpecCollection(KryptonBreadCrumb owner) : base(owner) { }