Table of Contents

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, INotifyPropertyChanged

Type 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

value T

The value of the item.

getDisplayName Func<string>

Function to get the display name of the item.

getDescription Func<string>

Function to get the description of the item.

iconUri Uri

The URI of the icon representing the item.

isObsolete bool

A value indicating whether the item is obsolete.

Properties

Description

Gets the description of the item.

public string Description { get; }

Property Value

string

DisplayName

Gets the display name of the item.

public string DisplayName { get; }

Property Value

string

Icon

Gets the icon URI of the item.

public Uri Icon { get; }

Property Value

Uri

IsObsolete

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

public bool IsObsolete { get; }

Property Value

bool

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.