Platforms: WP7SL, WP8SL, WinRT(Universal), SL5, WPF
Provides methods to register an event callback which is called only once.
- Register: Registers an event which is called only once and then deregistered:
(e, h) => e.LostFocus += h,
(e, h) => e.LostFocus -= h,
// TODO: Implement OnLostFocus method which is called only once and deregistred automatically.
- WaitForEventAsync (WinRT only): Used to wait for an event:
var args = await SingleEvent.WaitForEventAsync(element,
(element, handler) => element.LostFocus += handler,
(element, handler) => element.LostFocus -= handler);