Пример #1
0
            /// <summary>
            /// Remove a handler for the given source's event.
            /// </summary>
            public static void RemoveHandler(CommandManager source, EventHandler handler)
            {
                if (handler == null)
                    return; // 4.0-compat;  should be:  throw new ArgumentNullException("handler");

                CurrentManager.ProtectedRemoveHandler(source, handler);
            }
Пример #2
0
            /// <summary>
            /// Stop listening to the given source for the event.
            /// </summary>
            protected override void StopListening(object source)
            {
                CommandManager typedSource = CommandManager.Current;

                typedSource.PrivateRequerySuggested -= new EventHandler(OnRequerySuggested);
            }