< web:Blog x:Name="Brian Lagunas" />

25Sep/090

Extending the ObservableCollection to add navigation methods such as MoveFirst, MoveNext, MoveLast, and MovePrevious.

Recently, I had the need to navigate a list by using methods such as MoveFirts, MovePrevious, MoveNext, and MoveLast while at the same time keeping track of its current location to notify the user where they are at in the list.
Enter the ICollectionView.  “You can think of a collection view as a layer on top [...]

Filed under: .NET 3.5, WPF No Comments
3Jul/090

WPF Multithreading: Using the BackgroundWorker and Reporting the Progress to the UI.

I can’t count the number of times someone has asked me about running a time consuming task on a separate thread, but at the same time show a progress dialog with up-to-the-second percentage updates being displayed to the user. Multithreading can be confusing at first, but if you just take it one step at a [...]

Filed under: .NET 3.5, WPF No Comments
14May/092

Write a Sortable ObservableCollection for WPF

You probably have had the need to sort an ObservableCollection at some point in one of your applications by either ascending or descending order.  Of course, you can always use the ObservableCollection.OrderBy and ObservableCollection.OrderByDescending, but these methods just return a new collection of IOrderedEnumerable, which forces you have to rebind the DataContext/ItemsSource in your UI, [...]

Filed under: .NET 3.5, WPF 2 Comments