Table of Contents

Class SelectorItem

Namespace
Icy.UI.Controls
Assembly
IcyUI.dll

The container a Selector realizes each item as - an ItemContainer with selection/highlight state layered on top.

public class SelectorItem : ItemContainer, INotifyPropertyChanging, IBindingTarget, INotifyPropertyChanged, INotifyFocusChanged, IContainerLayout
Inheritance
SelectorItem
Implements
Derived
Inherited Members
Extension Methods

Remarks

IsSelected/IsHighlighted mirror IsChecked's own shape (set/clear a ControlState flag, no other side effects here) - Selector itself is what keeps them in sync with SelectedIndex/its internal highlighted index, including across a pool-and-reuse cycle (see AttachContainer(ItemContainer, int)).

Properties

IsHighlighted

Gets or sets a value indicating whether this item is the Selector popup's current keyboard/gamepad-highlighted item. Setting this sets/clears Highlighted.

public bool IsHighlighted { get; set; }

Property Value

bool

IsSelected

Gets or sets a value indicating whether this item is the Selector's current SelectedItem. Setting this sets/clears Selected.

public bool IsSelected { get; set; }

Property Value

bool

Methods

OnTap()

Invoked by Canvas when this element (or a descendant) is the target of a completed tap (see Tap). The base implementation does nothing.

protected override void OnTap()

Remarks

Called on the hit-tested element and every one of its ancestors (bubbling, with no "handled" flag in v1) - so e.g. a Button reacts to a tap on its label TextBlock just as it would to a tap on its own background.

Events

Tapped

Occurs when this item is tapped - raised from OnTap(). Used by WrapGrid/ ListBox for click-to-select, since their realized items live in the normal visual tree (unlike Selector's popup items, which use their own separate mechanism - see Selector's own remarks).

public event EventHandler? Tapped

Event Type

EventHandler