private void OnCustomDrawToolTip(object sender, ToolTipControllerCustomDrawEventArgs e) { if (!string.IsNullOrEmpty(e.ShowInfo.ToolTip) && ShowToolTips) { using (StringFormat fmt = new StringFormat()) { fmt.LineAlignment = StringAlignment.Center; fmt.Alignment = StringAlignment.Center; if (RightToLeft == RightToLeft.Yes) { fmt.FormatFlags |= StringFormatFlags.DirectionRightToLeft; } else { fmt.FormatFlags &= (~StringFormatFlags.DirectionRightToLeft); } using (SolidBrush br = new SolidBrush(ForeColor)) { e.Cache.Graphics.DrawString(e.ShowInfo.ToolTip, e.ShowInfo.Appearance.Font, br, e.Bounds, fmt); } } } e.Handled = true; }
private void toolTipController_CustomDraw(object sender, ToolTipControllerCustomDrawEventArgs e) { }