Пример #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));
        }
Пример #2
0
 void IKeyboardHandlerOwner.SetKeyboardHandler(KeyboardHandler handler)
 {
     _keyboardHandler = handler;
 }