Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SuperToolTip.Items Property

Gets the collection of objects that represent regions (title, content, etc.) in a super tooltip.

Namespace: DevExpress.Utils

Assembly: DevExpress.Utils.v24.2.dll

NuGet Packages: DevExpress.Utils, DevExpress.Wpf.Core

#Declaration

[Browsable(false)]
public ToolTipItemCollection Items { get; }

#Property Value

Type Description
DevExpress.Utils.ToolTipItemCollection

The collection of objects that represent regions (title, content, etc.) in a super tooltip.

#Remarks

A super tooltip consists of multiple regions: title, content, footer, separators. Use the Items property to access/add/remove objects that represent the regions:

  • ToolTipItem — the main region in a super tooltip that displays text and/or image.
  • ToolTipTitleItem — a region displayed at the top (title) or bottom (footer) of a tooltip. This region differs from the main region in default appearance settings.
  • ToolTipSeparatorItem — a horizontal line in a tooltip.

Regions are displayed in the tooltip one under another in the same order as in the collection.

#Example

The following examples demonstrate two different approaches to create a super tooltip ( SuperToolTip ) and assign in to a bar item. The super tooltip includes the title, main content, separator, and footer.

SuperTooltip.Setup_ex

#Example 1

using DevExpress.Utils;

private void Form1_Load(object sender, EventArgs e) {
  CreateSuperTooltip(barButtonItemChart);
}

void CreateSuperTooltip(BarItem barItem) {
  SuperToolTip superTip = new SuperToolTip();
  ToolTipItem item = new ToolTipItem();
  if(barItem.ImageOptions.SvgImage != null)
      item.ImageOptions.SvgImage = barItem.ImageOptions.SvgImage;
  item.Text = "Transform data to its most appropriate and readable visual representation. Insert bar charts, pie graphs, line graphs, or financial diagrams.";
  ToolTipItem footer = new ToolTipItem();
  superTip.AllowHtmlText = DefaultBoolean.True;
  footer.Text = "<a href=\"https://www.devexpress.com\">Learn more</a>";
  superTip.Items.AddTitle("Add a Chart");
  superTip.Items.Add(item);
  superTip.Items.AddSeparator();
  superTip.Items.Add(footer);
  barItem.SuperTip = superTip;
}

#Example 2

Create the SuperToolTipSetupArgs object, customize its settings, and pass it to the SuperToolTip.Setup method.

using DevExpress.Utils;

private void Form1_Load(object sender, EventArgs e) {
  SetupSuperTooltip(barButtonItemChart);
}

void SetupSuperTooltip(BarItem barItem) {
  SuperToolTip superTip = new SuperToolTip();
  SuperToolTipSetupArgs args = new SuperToolTipSetupArgs();
  args.Title.Text = "Add a Chart";
  args.Contents.Text = "Transform data to its most appropriate and readable visual representation. Insert bar charts, pie graphs, line graphs, or financial diagrams.";
  if(barItem.ImageOptions.SvgImage != null)
      args.Contents.ImageOptions.SvgImage = barItem.ImageOptions.SvgImage;
  args.ShowFooterSeparator = true;
  args.Footer.Text = "<a href=\"https://www.devexpress.com\">Learn more</a>";
  superTip.Setup(args);
  superTip.AllowHtmlText = DefaultBoolean.True;
  barItem.SuperTip = superTip;
}
See Also