ItemsSourceItem

Ecng.ComponentModel

Represents an item source item with a strongly typed value. Provides functionality for property change notifications.

Inherits: NotifiableObject

Implements: IItemsSourceItem<T>, IItemsSourceItem, INotifyPropertyChangedEx, INotifyPropertyChanged

Constructors

ItemsSourceItem
public ItemsSourceItem(T value, Func<string> getDisplayName, Func<string> getDescription, Uri iconUri, bool isObsolete)
itemsSourceItem = ItemsSourceItem(value, getDisplayName, getDescription, iconUri, isObsolete)

Represents an item source item with a strongly typed value. Provides functionality for property change notifications.

value
The value of the item.
getDisplayName
Function to get the display name of the item.
getDescription
Function to get the description of the item.
iconUri
The URI of the icon representing the item.
isObsolete
A value indicating whether the item is obsolete.

Properties

Description
public string Description { get; }
value = itemsSourceItem.Description

Gets the description of the item.

DisplayName
public string DisplayName { get; }
value = itemsSourceItem.DisplayName

Gets the display name of the item.

Icon
public Uri Icon { get; }
value = itemsSourceItem.Icon

Gets the icon URI of the item.

IsObsolete
public bool IsObsolete { get; }
value = itemsSourceItem.IsObsolete

Gets a value indicating whether the item is marked as obsolete.

Value
public T Value { get; }
value = itemsSourceItem.Value

Gets the strongly typed value of the item.

Methods

ToString
public override string ToString()
result = itemsSourceItem.ToString()

Returns the display name of the item.

Returns: The display name.