Class ItemsSourceItem<T>
- Namespace
- Ecng.ComponentModel
- Assembly
- Ecng.ComponentModel.dll
Represents an item source item with a strongly typed value. Provides functionality for property change notifications.
public class ItemsSourceItem<T> : NotifiableObject, INotifyPropertyChanging, IItemsSourceItem<T>, IItemsSourceItem, INotifyPropertyChangedEx, INotifyPropertyChangedType Parameters
- T
- The type of the value. 
- Inheritance
- 
      
      
      ItemsSourceItem<T>
- Implements
- Inherited Members
- Extension Methods
Constructors
ItemsSourceItem(T, Func<string>, Func<string>, Uri, bool)
Represents an item source item with a strongly typed value. Provides functionality for property change notifications.
public ItemsSourceItem(T value, Func<string> getDisplayName, Func<string> getDescription, Uri iconUri, bool isObsolete)Parameters
- valueT
- The value of the item. 
- getDisplayNameFunc<string>
- Function to get the display name of the item. 
- getDescriptionFunc<string>
- Function to get the description of the item. 
- iconUriUri
- The URI of the icon representing the item. 
- isObsoletebool
- A value indicating whether the item is obsolete. 
Properties
Description
Gets the description of the item.
public string Description { get; }Property Value
DisplayName
Gets the display name of the item.
public string DisplayName { get; }Property Value
Icon
Gets the icon URI of the item.
public Uri Icon { get; }Property Value
IsObsolete
Gets a value indicating whether the item is marked as obsolete.
public bool IsObsolete { get; }Property Value
Value
Gets the strongly typed value of the item.
public T Value { get; }Property Value
- T
Methods
ToString()
Returns the display name of the item.
public override string ToString()Returns
- string
- The display name.