Snippet: Ruby-like Hashes in C#

The ASP.NET MVC team developed a URL routing engine, similar to the engine in Rails, which has made it’s way into the rest of ASP.NET. ScottGu has covered it a few times in the past, and this post has some good examples of it. Here’s a quick example:

routes.MapRoute(”ShowProductByCategory”, “Products/Show/{Category}/{id}”,
new { controller […]

Bindable LINQ: Snapshot Enumerators

Snapshot enumerators are part of Bindable LINQ’s internal implementation which make editing collections while enumerating them possible. When you first started with .NET, you undoubtedly wrote code that looks like this:

foreach (string item in strings)
{
if (item.StartsWith(”H”))
{
strings.Remove(item);
[…]

Bindable LINQ: Bindable Aggregates

As with other LINQ operations, Bindable LINQ allows you to execute aggregates over values that can change over time. In the general sense, a Bindable LINQ aggregate is an operation that turns a series of values into a single value, and is not necessarily limited to numeric operations. Examples of such aggregates are classics such […]

Article: Inductive UI’s with WPF Navigation Applications

Navigation applications are an attractive feature of Windows Presentation Foundation that allow you to create task-focused user interfaces in a manner that is very difficult to achieve using Windows Forms. In this article, I’ll discuss some of the benefits the navigation application model provides, then describe the features in WPF that make building them possible. […]

Tip: VB.NET XAML Classes and Namespaces

One difference between XAML in a C# project and VB.NET projects is in specifying the x:Class of your XAML root element. For example, in a C# Window XAML file:
<Window
x:Class="BigBank.UI.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300"
>
<Grid>

[…]