TreeMapControl.GetItemBounds(ITreeMapItem) Method
Returns a Rectangle object that defines the location of an item passed as a parameter.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v24.1.UI.dll
NuGet Package: DevExpress.Win.TreeMap
Declaration
Parameters
Name | Type | Description |
---|---|---|
item | ITreeMapItem | A TreeMap item whose location is returned. |
Returns
Type | Description |
---|---|
Rectangle | A Rectangle object that defines the TreeMap item’s location. |
Remarks
The following code displays TreeMap item dimensions in item labels:
foreach (ITreeMapItem myItem in treeMap.DataAdapter.Items) {
TreeMapItem treeMapItem = (TreeMapItem)myItem;
Rectangle rect = treeMap.GetItemBounds(myItem);
treeMapItem.Label = String.Format("Width:{0}, Height:{1}", rect.Width.ToString(), rect.Height.ToString());
}
See Also