New to Telerik UI for WinForms? Start a free 30-day trial

Represents one item whose value and text are used to calculate and label a tree map region.

An item can supply its own Text and Value, or obtain them from its bound data item using the display and value members configured on its group or owning tree map.

Definition

Namespace:Telerik.WinControls.UI.TreeMap

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
[TypeConverter(typeof(TreeMapDataItemTypeConverter))]
public class TreeMapDataItem : IDataItem, INotifyPropertyChanged, IDisposable

Inheritance: objectTreeMapDataItem

Derived Classes: TreeMapDataItemGroup

Implements: IDataItemIDisposableINotifyPropertyChanged

Constructors

Initializes an item whose text and value can be set later or obtained from bound data.

C#
public TreeMapDataItem()

Initializes an item with an explicit display text and numeric value.

C#
public TreeMapDataItem(string text, double value)
Parameters:textstring

The item's display text.

valuedouble

The numeric value used by the tree map layout algorithm.

Properties

Gets the value used by the tree map algorithm.

C#
[Browsable(false)]
public double? AlgorithmValue { get; }

Gets or sets the bounds of the item.

C#
[Browsable(false)]
public RectangleF Bounds { get; set; }

Gets or sets the source object from which this item can obtain bound property values.

C#
[Browsable(false)]
public object DataBoundItem { get; set; }

Implements: IDataItem.DataBoundItem

Setting this property raises PropertyChanged. If the item belongs to a tree map with a non-null data source, the tree map also raises its ItemDataBound event.

Gets the number of bound properties exposed by the owning tree map's list source.

C#
public int FieldCount { get; }

Implements: IDataItem.FieldCount

Returns zero when the item is not attached to an initialized list source.

Gets or sets the group whose item list contains this item.

C#
[Browsable(true)]
public virtual TreeMapDataItemGroup Group { get; set; }

Changing the group removes the item from its previous group and adds it to the new one.

Gets the tree map element that currently owns this item.

C#
[Browsable(false)]
public RadTreeMapElement Owner { get; }

The element assigns ownership when it creates or adds the item and clears it when the item is removed.

Gets or sets the item style.

C#
[Browsable(false)]
public TreeMapItemStyle Style { get; set; }

Gets or sets the tag.

C#
[Bindable(true)]
[TypeConverter(typeof(StringConverter))]
public object Tag { get; set; }

Gets or sets the text.

C#
[Browsable(true)]
public virtual string Text { get; set; }

Gets or sets a bound property by its position in the owning list source's property list.

C#
public object this[int index] { get; set; }
Parameters:indexint

The zero-based position of the bound property.

Implements: IDataItem.this[int]

When the item is detached from a list source, the getter returns null and the setter has no effect.

Gets or sets a bound property by name through the owning tree map's list source.

C#
public object this[string name] { get; set; }
Parameters:namestring

The name of the bound property.

Implements: IDataItem.this[string]

When the item is detached from a list source, the getter returns null and the setter has no effect.

Gets or sets the value.

C#
[Browsable(true)]
public virtual double? Value { get; set; }

Methods

Provides the disposal hook for IDisposable; this implementation releases no resources.

C#
public virtual void Dispose()

Implements: IDisposable.Dispose()

Resolves the source value used by Value when no explicit value is set.

C#
protected virtual object GetBoundValue()
Returns:

object

The bound value member when configured; otherwise the display member, or the complete bound item when neither member is configured or the selected member cannot be read.

Gets the display-member name from the group, or from the owning tree map when the item is not grouped.

C#
protected virtual string GetDisplayMember()
Returns:

string

The configured display-member name, or an empty string when there is no owner or group.

Resolves the configured display member as text for the item's Text.

C#
protected object GetDisplayValue()
Returns:

object

The display-member value converted to text, or an empty string when it is unavailable.

Retrieves a named value from the bound item, falling back to the bound item itself if the property lookup fails.

C#
protected object GetValue(string propertyName)
Parameters:propertyNamestring

The bound property to retrieve.

Returns:

object

The property's value, or the complete bound item when lookup raises ArgumentException.

Gets the value-member name from the group, or from the owning tree map when the item is not grouped.

C#
protected virtual string GetValueMember()
Returns:

string

The configured value-member name, or an empty string when there is no owner or group.

Finds a bound property by name in the owning tree map's property list.

C#
public int IndexOf(string name)
Parameters:namestring

The bound property name to locate.

Returns:

int

The property's zero-based position, -1 if the name is not found, or 0 when the item has no list source.

Implements: IDataItem.IndexOf(string)

Raises PropertyChanged and keeps group membership valid when the owner changes.

C#
protected virtual void OnNotifyPropertyChanged(PropertyChangedEventArgs args)
Parameters:argsPropertyChangedEventArgs

The property change details.

If the item is moved to an owner different from its group's owner, its Group is cleared.

Raises PropertyChanged for the named property.

C#
protected virtual void OnNotifyPropertyChanged(string propertyName)
Parameters:propertyNamestring

The name of the property that changed.

Assigns the source object used for data-bound values and notifies the owning tree map when applicable.

C#
protected virtual void SetDataBoundItem(bool dataBinding, object value)
Parameters:dataBindingbool

Indicates that the assignment is performed by the list-binding path; this implementation does not branch on the flag.

valueobject

The source object associated with this item.

Events

Occurs when an item property changes, including when the item is attached to or removed from an owner.

C#
public event PropertyChangedEventHandler PropertyChanged

Implements: INotifyPropertyChanged.PropertyChanged