Skip to main content
A newer version of this page is available. .

TreeMapItem.IsGroup Property

Returns the value that indicates whether the item is a group.

Namespace: DevExpress.XtraTreeMap

Assembly: DevExpress.XtraTreeMap.v18.2.dll

Declaration

public bool IsGroup { get; }

Property Value

Type Description
Boolean

true if the item is a group; otherwise false.

Example

The following properties allow you to customize tooltips.

using DevExpress.Utils;
using DevExpress.XtraTreeMap;
using System;
using System.Windows.Forms;

namespace ToolTipCustomization {
    public partial class Form1 : Form {
        const String GroupToolTipText = "Place the cursor over an item to obtain information about it.";
        public Form1() {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e) {
            chkShowTooltip.Checked = treeMap.ShowToolTips;

            treeMap.ToolTipLeafPattern = "{L} : {V:C1} trillions";
            treeMap.ToolTipGroupPattern = GroupToolTipText;
        }

        private void chkShowTooltip_CheckedChanged(object sender, EventArgs e) {
            treeMap.ShowToolTips = chkShowTooltip.Checked;
        }

        private void chkTooltipController_CheckedChanged(object sender, EventArgs e) {
            treeMap.ToolTipController = (chkTooltipController.Checked) ? toolTipController1 : null;
        }

        private void toolTipController1_BeforeShow(object sender, ToolTipControllerShowEventArgs e) {
            TreeMapItem item = e.SelectedObject as TreeMapItem;
            if(item == null) return;
            if(item.IsGroup) return;

            SuperToolTip superTip = new SuperToolTip { AllowHtmlText = DefaultBoolean.True };
            superTip.Items.Add(new ToolTipTitleItem { Text = String.Format("{0} statistics", item.Label) });
            superTip.Items.Add(new ToolTipSeparatorItem());
            superTip.Items.Add(new ToolTipItem { Text = String.Format("<b>GDP (2014):</b> {0:C1} trillions", item.Value) });
            e.SuperTip = superTip;

        }
    }
}

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsGroup property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also