RaiseAutomationEvent() public méthode

public RaiseAutomationEvent ( AutomationEvent eventId, AutomationEventArgs e ) : bool
eventId System.Windows.Automation.AutomationEvent
e System.Windows.Automation.AutomationEventArgs
Résultat bool
Exemple #1
0
        public override void RaiseAutomationEvent(AutomationEvent eventId, AutomationEventArgs e)
        {
            if (editableTextExpert.RaiseAutomationEvent(eventId, e))
            {
                return;
            }

            if (eventId == SelectionItemPatternIdentifiers.ElementSelectedEvent)
            {
                List list = Parent as List;
                if (list != null)
                {
                    list.NotifyItemSelected(this);
                }
                else
                {
                    NotifyStateChange(Atk.StateType.Selected, true);
                }
            }
            else if (eventId == SelectionItemPatternIdentifiers.ElementAddedToSelectionEvent)
            {
                NotifyStateChange(Atk.StateType.Selected, true);
            }
            else if (eventId == SelectionItemPatternIdentifiers.ElementRemovedFromSelectionEvent)
            {
                NotifyStateChange(Atk.StateType.Selected, false);
            }
        }
Exemple #2
0
        public override void RaiseAutomationEvent(AutomationEvent eventId, AutomationEventArgs e)
        {
            if (editableTextExpert.RaiseAutomationEvent(eventId, e))
            {
                return;
            }

            base.RaiseAutomationEvent(eventId, e);
        }