Пример #1
0
        /// <summary>
        /// Adds a component that is capable of having focus to this FocusManager
        /// and registers for the appropriate events using PageComponent.GetFocusedCommands()
        /// </summary>
        /// <param name="component">the component that is to be added</param>
        internal void AddPageComponent(PageComponent component)
        {
            if (_components.Contains(component))
            {
                return;
            }

            RegisterMultipleCommandHandler((ICommandHandler)component,
                                           component.GetFocusedCommands());
            _components.Add(component);
        }
Пример #2
0
        /// <summary>
        /// Removes a component from the FocusManager and unregisters the commands that it is
        /// registerd for using PageComponent.GetFocusedCommands()
        /// </summary>
        /// <param name="component"></param>
        internal void RemovePageComponent(PageComponent component)
        {
            if (!_components.Contains(component))
            {
                return;
            }

            UnregisterMultipleCommandHandler((ICommandHandler)component,
                                             component.GetFocusedCommands());

            // Release the focus from the component in case it has it
            ReleaseFocusFromComponent(component);
            _components.Remove(component);
        }
Пример #3
0
        /// <summary>
        /// Removes a component from the FocusManager and unregisters the commands that it is
        /// registerd for using PageComponent.GetFocusedCommands()
        /// </summary>
        /// <param name="component"></param>
        internal void RemovePageComponent(PageComponent component)
        {
            if (!_components.Contains(component))
                return;

            UnregisterMultipleCommandHandler((ICommandHandler)component,
                                             component.GetFocusedCommands());

            // Release the focus from the component in case it has it
            ReleaseFocusFromComponent(component);
            _components.Remove(component);
        }
Пример #4
0
        /// <summary>
        /// Adds a component that is capable of having focus to this FocusManager
        /// and registers for the appropriate events using PageComponent.GetFocusedCommands()
        /// </summary>
        /// <param name="component">the component that is to be added</param>
        internal void AddPageComponent(PageComponent component)
        {
            if (_components.Contains(component))
                return;

            RegisterMultipleCommandHandler((ICommandHandler)component,
                                           component.GetFocusedCommands());
            _components.Add(component);
        }