void ShowToolTip(object sender, ToolTipEventArgs args) { ToolTip = ToolTipFactory.CreateToolTip(Symbol, (SmartBar as CSharpSmartBar)._Context.SemanticModel.Compilation); this.SetTipOptions(); ToolTipService.SetPlacement(this, System.Windows.Controls.Primitives.PlacementMode.Left); ToolTipOpening -= ShowToolTip; }
protected override void OnToolTipOpening(ToolTipEventArgs e) { base.OnToolTipOpening(e); if (Config.Instance.NaviBarOptions.MatchFlags(NaviBarOptions.SymbolToolTip) == false) { ToolTip = null; return; } if (this.HasDummyToolTip()) { // todo: handle updated syntax node for RootItem if (Symbol != null) { var tip = ToolTipFactory.CreateToolTip(Symbol, true, _Bar._SemanticContext.SemanticModel.Compilation); if (Config.Instance.NaviBarOptions.MatchFlags(NaviBarOptions.LineOfCode)) { tip.AddTextBlock() .Append("Line of code: " + (Node.GetLineSpan().Length + 1)); } ToolTip = tip; } else { ToolTip = Node.Kind().GetSyntaxBrief(); } this.SetTipOptions(); } }