protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) { var selectedItem = ((System.Windows.FrameworkElement)e.OriginalSource).DataContext; this.OnItemSingleClickHandler(this, ItemMouseSingleClickEventArgs <object> .ItemSingleClick(selectedItem)); base.OnMouseLeftButtonDown(e); }
private void Item_OnClickHandler(object sender, ItemMouseSingleClickEventArgs <object> e) { NumberBoxItem item = sender as NumberBoxItem; this.SelectedItem = item.Content; }