Monday, July 27, 2009

WPF controls not showing a state change

I created a dependency property in the code behind to enable/disable a button during processing.wpf code-behind

In the XAML, I bound the IsEnabled property to the dependency property. XAML button binding

The button wasn’t showing the state change. Don’t forget to add the Name property to the window or the property won’t show the state change. XAML window name

Thursday, July 16, 2009

Encoding Media with Expression Blend and Encoder 2 SDK

This week I presented for the Fort Wayne .Net Users Group (NUFW). There were about ten people in attendance and the presentation lasted about one and a half hours with an Encoder GUI walkthrough and two demos. The Power Point presentation and source code can be downloaded here. The theme of the main Demo was ZooTube a simple WPF app to encode media with an Intro and an in-video watermark (screenshot of app is below the video). The code was based on the VB sample code that is included in the Encoder 2 SDK download. The finished video is shown below.
zootube wpf app screenshot

Wednesday, July 8, 2009

LINQ Query Samples in VB

Sometimes what you are looking for is right in front of you. There are a lot more samples of LINQ query syntax in C# than VB.Net and the syntax is enough different that it often requires a sample snippet to get it right in all but the simplest queries. I rarely use the Visual Studio snippets when programming so I didn’t even think to look there for LINQ snippets, but they are there. Just right click in the source window, “Insert Snippet”, “Data – LINQ, XML, Designer, ADO.Net”, “LINQ Queries”.