Class RepeaterRowEventArgs
One row a Repeater has just built, and a way to reach the controls in it.
public sealed class RepeaterRowEventArgs : EventArgs
- Inheritance
-
RepeaterRowEventArgs
- Inherited Members
Remarks
Rows are deliberately kept out of the view's control tree, so GetControl(string) cannot find anything inside one -- and could not usefully if it did, since every row shares the item template's ids and a walk would return an arbitrary one of N. That is right for ids and bindings, and leaves a real gap for anything a row cannot express as a binding at all.
The case this exists for: a character portrait, which is a cell out of a sprite sheet
picked by arithmetic the consuming game owns. A "{Binding X}" has no converter step
to run that in, so the row has to be handed to the code that can. Find(string)
resolves within this row only, so "this row's portrait" is expressible where
GetControl("portrait") is not.
Properties
Item
The item this row was built from.
public object Item { get; }
Property Value
Root
The row's top-level control.
public UIElement Root { get; }
Property Value
Methods
Find(string)
The control with this id within this row, or null.
public UIElement Find(string controlId)
Parameters
controlIdstring
Returns
Find<T>(string)
The control with this id within this row, if it is a T.
public T Find<T>(string controlId) where T : UIElement
Parameters
controlIdstring
Returns
- T
Type Parameters
T