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

19May/100

WPF Goodies in the Silverlight 4 Tools

If you haven’t heard already, the Silverlight Tools for VS2010 have been released, as mentioned by fellow ElegantCoder Bill Moore.  In this release there have been some great improvements to the Visual Studio designer that work for both Silverlight and WPF.  Lets check them out.
Go To Value Definition
Have you ever had a control that had [...]

Filed under: Silverlight, WPF No Comments
28Jan/100

NETDUG – Silverlight/WPF Multi-Targeting Presentation Sample Code

If you attended the NETDUG user group meeting last Thursday night and would like to download the sample code for my Silverlight/WPF Multi-Targeting presentation, you can download it here.
Recap:
The Silverlight and WPF platforms are very similar, but they do not have binary compatibility; this means that an assembly compiled for one platform cannot execute on [...]

4Dec/090

BSDG – Silverlight/WPF Multi-Targeting Presentation Sample Code

If you attended the BSDG user group meeting last night and would like to download the sample code for my Silverlight/WPF Multi-Targeting presentation, you can download it here.
Recap:
The Silverlight and WPF platforms are very similar, but they do not have binary compatibility; this means that an assembly compiled for one platform cannot execute on [...]

Filed under: BSDG, Silverlight, WPF, XAML No Comments
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
22Sep/090

NETDUG: WPF Event Routing Sample Code

Here is the sample code for last Thursday’s WPF Event Routing presentation.
Download Sample Code
I know I covered the subject fast, but I was in a hurry. I had to go to the airport. So here is a quick review.
Event Types:

Direct events are like ordinary .NET events. They originate in one element and don’t pass to [...]

Filed under: NETDUG, WPF No Comments
21Aug/094

A Simple WPF Loading Animation

Okay, so I needed a very simple and clean loading animation for a multi threaded application I was working on to notify the user that something was in the process of being loaded.  So of course the first place I looked was Google, because I figured someone else has already written one and I could [...]

Filed under: WPF, XAML 4 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
5Jun/091

BSDG – PRISM/MVVM for WPF Presentation Sample Code

As promised, I am posting the sample code I covered in the presentation for everyone to download and start playing with.  If you have any questions or would like me to discuss a specific aspect in more detail just drop me a line.
Download the Presentation Source.  This contains the all sample code that I discussed [...]

Filed under: BSDG, Prism, WPF 1 Comment
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
14Apr/090

Debugging XAML

Okay, so I have been asked this question more than almost any XAML related question in the past few weeks; How do I debug XAML?  The problem with XAML’s powerful binding model is that it can be difficult to debug errors in your binding paths.
Lets say I have the following code snippet:

<StatusBar>
<StatusBarItem>
[...]

Filed under: WPF, XAML No Comments