TreeMapControl.GetItemBounds(ITreeMapItem) Method
In This Article
Returns a Rectangle object that defines the location of an item passed as a parameter.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v24.2.UI.dll
NuGet Package: DevExpress.Win.TreeMap
#Declaration
public Rectangle GetItemBounds(
ITreeMapItem item
)
#Parameters
Name | Type | Description |
---|---|---|
item | ITree |
A Tree |
#Returns
Type | Description |
---|---|
Rectangle | A Rectangle object that defines the Tree |
#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