protected override DependencyObject GetContainerForItemOverride() { var item = new PowerListBoxItem(); if (ItemContainerStyle != null) { item.Style = ItemContainerStyle; } return(item); }
internal void InvokeItemSelectedEvent(PowerListBoxItem selItem) { if (ItemSelected == null) { return; } if (selItem == null) { ItemSelected(this, new ItemSelectedEventArgs()); } else if (selItem.DataContext != null) { ItemSelected(this, new ItemSelectedEventArgs { OldSelectedItem = SelectedItem, NewSelectedItem = selItem.DataContext }); } else { ItemSelected(this, new ItemSelectedEventArgs { OldSelectedItem = SelectedItem, NewSelectedItem = selItem }); } }
protected override DependencyObject GetContainerForItemOverride() { var item = new PowerListBoxItem(); if (ItemContainerStyle != null) item.Style = ItemContainerStyle; return item; }
internal void InvokeItemSelectedEvent(PowerListBoxItem selItem) { if (ItemSelected == null) return; if (selItem == null) ItemSelected(this, new ItemSelectedEventArgs()); else if (selItem.DataContext != null) ItemSelected(this, new ItemSelectedEventArgs { OldSelectedItem = SelectedItem, NewSelectedItem = selItem.DataContext }); else ItemSelected(this, new ItemSelectedEventArgs { OldSelectedItem = SelectedItem, NewSelectedItem = selItem }); }