creativity is that spark of electricity before an explosion.
it allows us, in a single instance to explore all possibilities without hesitation.
Bindable LINQ is a set of extensions to LINQ that add data binding and change propagation capabilities to standard LINQ queries.
Suppose you wrote the following LINQ to Objects query:
ObservableCollection<Contact> contacts = new ObservableCollection<Contact>();
itemsControl.ItemsSource = from c in contacts
where c.Name.StartsWith("P")
select c;
contacts.Add(new Contact() { Name = "Omar" });
contacts.Add(new Contact() { Name = "Paul" });
Developers familiar with Windows Presentation Foundation or Silverlight know that the ObservableCollection<T> class is designed to propagate change; that is, it raises CollectionChanged events when items are added to the list. However, if you wrote the code above, you would find that neither Omar nor Paul appear on the screen. Why?
It turns out that the objects returned by a LINQ to Objects query do not provide CollectionChanged events. The out of the box LINQ experience makes it difficult for rich client developers to display changes to data while simultaneously using LINQ.
ObservableCollection<Contact> contacts = new ObservableCollection<Contact>();
itemsControl.ItemsSource = from c in contacts.*AsBindable()*
where c.Name.StartsWith("P")
select c;
contacts.Add(new Contact() { Name = "Omar" });
contacts.Add(new Contact() { Name = "Paul" });
Bindable LINQ will detect that the query relies on the Text property of the TextBox object, textBox1. Since the TextBox is a WPF control, Bindable LINQ knows to subscribe to the TextChanged event on the control.
The end result is that as the user types, the items in the query are re-evaluated and the changes appear on screen.
and
| [+] | Software Development Blog |
| [+] | Software languages and development platforms |
| [+] | C++ Software |
| [+] | Posix software |
| [+] | Java and .NET both bring something to the Enterprise arena |
| [+] | Microsoft is looking to acquire forward thinking search engine technoogy trovider Powerset |
| [+] | Protocol Buffers - Google's Data Interchange Format |
| [+] | Programming - Silverlight - Data binding |
| [+] | Programming - Command Behavioral Design Pattern |
| [+] | ASP.NET MVC Development |
| [+] | Embedded Systems Engineering Embedded software and embedded systems, are those that require 100% o.. |
| [+] | JavaFX goes head to head against Flash and Silverlight in the RIA stakes |
| [+] | Microsoft DLR (Dynamic Language Runtime) information released |
