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(); } }
private void AddToolTip() { var tp = ToolTipFactory.GetToolTip(); tp.SetToolTip(metarLbl, "View METAR"); tp.SetToolTip(updateBtn, "Refresh METAR"); }
protected virtual void SpawnToolTip(TooltipTypes type, object _obj) { bool make_generic = false; string generic_text = ""; ToolTipInstance = Instantiate(ToolTipFactory.GetPrefab(type, _obj, out make_generic, out generic_text)).GetComponent <UI_ToolTip_Base>(); if (make_generic) { _obj = new GenericToolTipTarget(string.IsNullOrEmpty(generic_text) ? DisplayText : generic_text); } InitializeToolTip(_obj); }
private void AddToolTip() { var tp = ToolTipFactory.GetToolTip(); tp.SetToolTip(GetMetarBtn, "Download METAR and fill all weather info."); }