﻿namespace ControlzEx.Internal
{
    using System.Reflection;
    using System.Windows.Automation.Peers;
    using System.Windows.Controls;

    internal static class SelectorAutomationPeerExtensions
    {
        private static readonly MethodInfo RaiseSelectionEventsMethodInfo = typeof(SelectorAutomationPeer).GetMethod("RaiseSelectionEventsMethodInfo", BindingFlags.NonPublic | BindingFlags.Instance);

        internal static void RaiseSelectionEvents(this SelectorAutomationPeer selectorAutomationPeer, SelectionChangedEventArgs e)
        {
            RaiseSelectionEventsMethodInfo.Invoke(selectorAutomationPeer, new[]
                                                                          {
                                                                              e
                                                                          });
        }
    }
}
﻿namespace ControlzEx.Internal
{
    using System.Reflection;
    using System.Windows.Automation.Peers;
    using System.Windows.Controls;

    internal static class SelectorAutomationPeerExtensions
    {
        private static readonly MethodInfo RaiseSelectionEventsMethodInfo = typeof(SelectorAutomationPeer).GetMethod("RaiseSelectionEvents", BindingFlags.NonPublic | BindingFlags.Instance);

        internal static void RaiseSelectionEvents(this SelectorAutomationPeer selectorAutomationPeer, SelectionChangedEventArgs e)
        {
            RaiseSelectionEventsMethodInfo.Invoke(selectorAutomationPeer, new object[] {e});
        }
    }
}
Fix wrong method info for RaiseSelectionEvents
TabControlEx: Fix wrong method info for RaiseSelectionEvents

Fix getting the wrong method info for RaiseSelectionEvents.
