inotifycollectionchanged

ObservableQueue?

Has anyone written a version of .Net's generic Queue that implements INotifyCollectionChanged, or is there one hidden deep in the .Net framework somewhere already? ...

ObservableCollection Doesn't support AddRange method, so I get notified for each item added, besides what about INotifyCollectionChanging?

I want to be able to add a range and get updated for the entire bulk. I also want to be able to cancel the action before it's done (i.e. collection changing besides the 'changed'). Related Q http://stackoverflow.com/questions/57020/which-net-collection-for-adding-multiple-objects-at-once-and-getting-notified ...

ItemsSource + Converter + Treeview wont update

This one is fairly complex, hopefully I can make this clear enough for somebody to help me out. I have an object lets call it a Manager, the Manager has a collection of people that he manages, the people all implement IPerson, but different types of people have different properties. I want to display this manager in a tree, and under the...

WPF ListBox not binding to INotifyCollectionChanged or INotifyPropertyChanged Events

I have the following test code: private class SomeItem{ public string Title{ get{ return "something"; } } public bool Completed { get { return false; } set { } } } private class SomeCollection : IEnumerable<SomeItem>, INotifyCollectionChanged { private IList<SomeItem> _items = new List<SomeI...

How do I update an IValueConverter on CollectionChanged?

Here's a basic example to explain my problem. Let's say I have ObservableCollection<int> Numbers {get; set;} and an IValueConverter that returns the sum of Numbers. Normally what I'd do is changed the IValueConverter into an IMultiValueConverter and bind a second value to Numbers.Count like this <MultiBinding Converter="{StaticRes...

Possible to call another event with an event?

I have a database with LINQ to SQL ORM. I am manipulating the database with the repository pattern. My IAssignmentRepository implements INotifyCollectionChanged with its single event, CollectionChanged. I just want to know if it was possible (and senseless) for me to create a delegate (AssignmentsChangedDelegate) and event (AssignmentsCh...

[.NET] Which NotifyCollectionChangedAction is used to indicate that an item changed?

When implementing INotifyCollectionChanged and raising the CollectionChanged event, you must provide a NotifyCollectionChangedAction argument. Which NotifyCollectionChangedAction is used to indicate that an item in the collection has changed, such as in the case where an item's value changes? ...

Custom ObservableCollection

I have a question about a class I created that is similar to the ObserverableCollection. My class basically has the same same functionality as it, but I add some automatic sorting features to it when items are added to the List. My question is my class implements the interface INotifyCollectionChanged so that the ListView, which displays...

Observable Stack and Queue

I'm looking for an INotifyCollectionChanged implementation of Stack and Queue. I could roll my own but I don't want to reinvent the wheel. ...

canceling remove action - NotifyCollectionChangedAction

I am using the following code in my viewmodel to delete items out of a collection: UnitMeasureCollection.CollectionChanged += new NotifyCollectionChangedEventHandler(ListOfUnitMeasureCollectionChanged); void ListOfUnitMeasureCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { if (e.Action == NotifyCollectionChan...

WPF how to detach event hooks in UserControls

I have a WPF UserControl that contains a ComboBox. I need to attach an event listener to the ComboBox.Items collection. public MyUserControl() { InitializeComponent(); ((INotifyCollectionChanged)comboBox.Items).CollectionChanged += ComboBoxItemsChanged; } But I cant seem to figure out how to detach it. Or is that han...

NotifyCollectionChangedAction: object instance on removal?

I am currently implementing the INotifyCollectionChanged interface for a collection with generally quite critical and short-lived items. All of those items implement IDispose, which can be called immediatly before the removal from the collection. I do not have any control about the destruction order, I will just have to take it as it com...

How to create a custom observable collection using ConcurrentDictionary, INotifyCollectionChanged, INotifyPropertyChanged

Hi All I am trying to create an ObservableConcurrentDictionary. This object will be used in a multithreaded application, and it's data is used to populate a control via the controls ItemsSource property. This is the implementation i have come up with: public sealed class ObservableConcurrentDictionary<TKey, TValue> : ConcurrentDiction...