Пример #1
0
        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
        {
            base.PrepareContainerForItemOverride(element, item);

            ComboBoxItem container = element as ComboBoxItem;

            if (container != null)
            {
#if MIGRATION
                container.AddHandler(MouseLeftButtonDownEvent, new MouseButtonEventHandler(ComboBoxItem_Click), true);
#else
                container.AddHandler(PointerPressedEvent, new PointerEventHandler(ComboBoxItem_Click), true);
#endif
            }
        }