Esempio n. 1
0
        public static IDisposable KeyboardDidHideWeakSubscribe(
            [NotNull] this KeyboardHandler keyboardHandler,
            [NotNull] EventHandler <KeyboardSizeChangedEventArgs> keyboardDidHideHandler)
        {
            if (keyboardHandler == null)
            {
                throw new ArgumentNullException(nameof(keyboardHandler));
            }
            if (keyboardDidHideHandler == null)
            {
                throw new ArgumentNullException(nameof(keyboardDidHideHandler));
            }

            return(new WeakEventSubscription <KeyboardHandler, KeyboardSizeChangedEventArgs>(
                       keyboardHandler,
                       (eventSource, eventHandler) => eventSource.NotNull().KeyboardDidHide += eventHandler,
                       (eventSource, eventHandler) => eventSource.NotNull().KeyboardDidHide -= eventHandler,
                       keyboardDidHideHandler));
        }
Esempio n. 2
0
 void IKeyboardHandlerOwner.SetKeyboardHandler(KeyboardHandler handler)
 {
     _keyboardHandler = handler;
 }