public override bool OnMouseUp(Glyph g, MouseButtons button) { //MessageBox.Show("Hey, you clicked the mouse here"); //this. ShowTabGlyph myG = (ShowTabGlyph)g; if (myG.Callback != null) { myG.Callback(); } return(true); // indicating we processed this event. }
public override void Initialize(IComponent component) { base.Initialize(component); // Add the custom set of glyphs using the BehaviorService. // Glyphs live on adornders. myAdorner = new Adorner(); BehaviorService.Adorners.Add(myAdorner); myGlyph = new ShowTabGlyph(BehaviorService, Control); myGlyph.Callback = () => { ((MyCustomTabButton)this.Control).ShowMyTab(); }; myAdorner.Glyphs.Add(myGlyph); }