private static void LostScrollFocusClass(Actor sender, ScrollFocusChangedEventArgs e) { if (sender != null) { sender.OnLostScrollFocus(e); } }
public void SetScrollFocus(Actor actor) { if (_scrollFocus == actor) { return; } Actor oldScrollFocus = _scrollFocus; _scrollFocus = actor; if (oldScrollFocus != null) { ScrollFocusChangedEventArgs eva = Pools <ScrollFocusChangedEventArgs> .Obtain(); eva.RoutedEvent = LostScrollFocusEvent; eva.NewFocus = actor; eva.OldFocus = oldScrollFocus; bool cancel = oldScrollFocus.RaiseEvent(eva); Pools <ScrollFocusChangedEventArgs> .Release(eva); if (cancel) { return; } } if (actor != null) { ScrollFocusChangedEventArgs eva = Pools <ScrollFocusChangedEventArgs> .Obtain(); eva.RoutedEvent = GotScrollFocusEvent; eva.NewFocus = actor; eva.OldFocus = oldScrollFocus; if (actor.RaiseEvent(eva)) { SetScrollFocus(oldScrollFocus); } Pools <ScrollFocusChangedEventArgs> .Release(eva); } }
protected virtual void OnLostScrollFocus(ScrollFocusChangedEventArgs e) { }