xaml - Why WPF introduces a new types for collections? -


i found out, wpf uses internally lot of collections such itemcollection or datagridcollumncollection. why not use plain old list or array instead?

itemscollection great example. provides grouping , sorting accessible xaml traditional linq not.

the other classes follow same pattern. add features should not, or cannot added extremely commonly used collection types. changing behaviour or performance of list<t> breaking api change somebody.

most of these classes implementations of static decorator pattern. features added existing collection concept, without changing existing classes. notice inherits , implements following:

  • ilist
  • icollection
  • ienumerable

these bread , butter interfaces working collections of types. i'd surprised if itemscollection doesn't use list<object> backing store @ point in implementation.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -