예제 #1
0
 internal static void RaisePropertyChangedIfListener <T>(
     UIElement element,
     AutomationProperty automationProperty,
     T oldValue,
     T newValue)
 {
     RaisePropertyChanged(element, automationProperty, oldValue, newValue, checkIfListenerExists: true);
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }