Property Value
Value
Gets or sets the currently selected item as a T object.
public T? Value { get; set; }
Property Value
- T
The selected item, or null if no item is selected or the source is not set.
Remarks
The getter retrieves the object at the selected index from the typed source collection.
The setter locates the object in the collection and updates SelectedItem to the corresponding index.
If value is null, the selection is cleared.
If the source collection has not been set, or if value is not found
in the collection, the setter is a no-op and the selection remains unchanged.
This differs from the base SelectedItem setter, which throws
ArgumentException for an out-of-range index. Here, a value not present in
the collection is not considered an error — the caller may hold a stale reference or the
collection may have changed since the reference was obtained.