예제 #1
0
        // Token: 0x06005152 RID: 20818 RVA: 0x0016CEF8 File Offset: 0x0016B0F8
        private static void OnIsSelectedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ListBoxItem listBoxItem    = d as ListBoxItem;
            bool        flag           = (bool)e.NewValue;
            Selector    parentSelector = listBoxItem.ParentSelector;

            if (parentSelector != null)
            {
                parentSelector.RaiseIsSelectedChangedAutomationEvent(listBoxItem, flag);
            }
            if (flag)
            {
                listBoxItem.OnSelected(new RoutedEventArgs(Selector.SelectedEvent, listBoxItem));
            }
            else
            {
                listBoxItem.OnUnselected(new RoutedEventArgs(Selector.UnselectedEvent, listBoxItem));
            }
            listBoxItem.UpdateVisualState();
        }