internal static void RaisePropertyChangedIfListener <T>( UIElement element, AutomationProperty automationProperty, T oldValue, T newValue) { RaisePropertyChanged(element, automationProperty, oldValue, newValue, checkIfListenerExists: true); }
internal static void RaisePropertyChanged <T>( UIElement element, AutomationProperty automationProperty, T oldValue, T newValue, bool checkIfListenerExists = false) { if (checkIfListenerExists && !ListenerExistsHelper(AutomationEvents.PropertyChanged)) { return; } CreatePeerForElement(element)?.RaisePropertyChangedEvent(automationProperty, oldValue, newValue); }
internal static AutomationPropertyEnum ConvertPropertyToEnum(AutomationProperty property) { if (property == null) { return(AutomationPropertyEnum.EmptyProperty); } if (property == AutomationElementIdentifiers.NameProperty) { return(AutomationPropertyEnum.NameProperty); } if (property == SelectionItemPatternIdentifiers.IsSelectedProperty) { return(AutomationPropertyEnum.IsSelectedProperty); } return(AutomationPropertyEnum.NotSupported); }