internal override bool FocusPrevious(HtmlEvent evt) { if (_focusedIndex == -1) { _focusedIndex = Children.Count - 1; } int i = _focusedIndex; while (i > -1) { Component comp = Children[i]; if (comp.FocusPrevious(evt)) { // If focus is not moving, don't reset the focus of the gallery item if (i != _focusedIndex) { ((Component)Children[_focusedIndex]).ResetFocusedIndex(); _focusedIndex = i; } return(true); } i--; } ((Component)Children[_focusedIndex]).ResetFocusedIndex(); _focusedIndex = -1; return(false); }
internal override bool FocusPrevious(HtmlEvent evt) { if (_focusedIndex == -1) { _focusedIndex = Children.Count - 1; } int i = _focusedIndex; while (i > -1) { Component comp = Children[i]; if (comp.FocusPrevious(evt)) { _focusedIndex = i; return(true); } i--; } _focusedIndex = -1; return(false); }