Exemplo n.º 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);
            }
Exemplo n.º 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);
            }