Rubens Blog
Less-than-daily WPF... but for a good reason! 
Thursday, April 16, 2009, 08:38 AM
Posted by Ruben Steins
The next couple of weeks I'm not going to post anything on this blog. My girlfriend and me are in the process of expanding our family and in the next two weeks I expect our firstborn to arrive. This means I don't have a lot of spare time to do WPF, Silverlight or anything else .NET related (except in my job of course).

So, I hope to see you all back in about a month or two. I promise I will keep you posted about the baby once in a while :)

Cheers,
Ruben
3 comments ( 16 views )   |  permalink   |   ( 3.1 / 86 )
Glass Effect in WPF and Scrollable Fiction Canvas for Silverlight 
Friday, April 10, 2009, 10:22 AM
Posted by Ruben Steins
When I was looking at this article and the Scrollable Friction Canvas For Silverlight, a joint venture by Sasha Berber and Jeremiah Morrill I came across another post on the Jeremiahs blog in which he showed off his CustomBehavior for WPF.

This glass effect looks amazing!


add comment ( 28 views )   |  permalink   |  related link   |   ( 3 / 88 )
[Non-WPF] I finally get it now... yield! 
Thursday, April 9, 2009, 10:42 PM
Posted by Ruben Steins
While working through the excellend first chapter of the new APS.NET MVC book, I came across the yield keyword. Although I know I should get to terms with it, I was never able to really grasp what the benefits of using it were. Thank heavens this guy has explained it so well on his blog. The MSDN examples pale in comparison to the clear and easy with-and-without yield examples Yason Young gives. From the comments on the posts, it's clear I am not alone in the yield-fearing world :)

Update: today I even contrived my own little test for yield:


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
List<int> integers = new List<int>() { 3, 4, 8, 14, 24, 28, 52, 11, 33, 12,6 };
Program p = new Program();

TwoFilter filter2 = new TwoFilter();
ThreeFilter filter3 = new ThreeFilter();

int count = 0;
foreach (int i in filter3.Process(filter2.Process(integers)))
{
Console.WriteLine(i);
count++;
}
Console.ReadKey();
}
}

public interface IFilter<T>
{
IEnumerable<T> Process(IEnumerable<T> input);
}

public class TwoFilter : IFilter<int>
{
public IEnumerable<int> Process(IEnumerable<int> input)
{
foreach (int i in input)
{
if (i % 2 == 0)
{
Console.WriteLine("Called div 2 for " + i);
yield return i;
}
}
}
}

public class ThreeFilter : IFilter<int>
{
public IEnumerable<int> Process(IEnumerable<int> input)
{
foreach (int i in input)
{
if (i % 3 == 0)
{
Console.WriteLine("Called div 3 for " + i);
yield return i;
}
}
}
}
}


This uses some simply chaining to determine for each integer if its divisble by 2 and by 3. The nice thing is that the when you break out of the call loop (in Main) at any point, the Process method has not been called for any integer in the collection after that point, which could be a possible performance gain. Also it save you the trouble of creating temporary collections in each of the process methods to store the intermediate resultset in. All in all, pretty nifty, this yield.
add comment ( 1 view )   |  permalink   |  related link   |   ( 2.9 / 44 )
Mediator Prototype for WPF Apps 
Wednesday, April 8, 2009, 03:49 PM
Posted by Ruben Steins
The Mediator pattern seems to be hot amongst the WPF Desciples... After Marlon Grech blogged about it, now so is Josh Smith:

This blog post shows a prototype implementation of the Mediator design pattern, intended to be used in WPF and, possibly, Silverlight applications. The Mediator class can be used to provide loosely-coupled message-based communication between various entities, such as ViewModel objects.

add comment   |  permalink   |  related link   |   ( 3 / 46 )
Teach Yourself WPF in 24 Hours - Chapter 1 
Tuesday, April 7, 2009, 11:47 AM
Posted by Ruben Steins
Code Magazine has features the first chapter of 'Teach yourself WPF in 24 Hours' by Rob Eisenberg and Christopher Bennage.

Hour 1 "What WPF Is and Isn’t" covers the following:
* What WPF is
* When you should use WPF
* What tools you will need
* How WPF compares to other frameworks
* The versions of .NET
* Silverlight


Also, on an aside, you might want to check out this special offer for a subscription on Code-magazine. You'll get if for 3 years for a rediculously low price!
add comment   |  permalink   |  related link   |   ( 2.9 / 31 )

<<First <Back | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | Next> Last>>