next best geek
this blog cannot be explained in a few words

.net: You got the source, now grab it

April 15th, 2008 . by Tobias

You know the pity: You're once again working on the train and have only a lousy HSDPA or UMTS connection but right a this point in time you would need to debug into the .net source code. You are actually able to get the source code since MSFT released it on 1/16/2008 but in this case your connection is to slow to grab ~10 MB of source files.

Two guys posted a .NET Source Code Mass Downloader on codeplex which might help you in those cases. The mass downloader enables you to download the .net source code while you are on the company's network. After you've once downloaded the source there is no longer any need to download the files for every new debug session separately. Mission accomplished: You can debug into the source on the train even without any connection :)

Thanks to Kerem Kusmezer and John Robbins for releasing such a wonderful tool.

-t


Framework Design

April 10th, 2008 . by Tobias

Brad Abrams wrote about the just released Framework Design Studio. Also there is not that much functionality included right now it already helped me to identify API changes between two milestones in an internal WPF framework we currently work on.

http://blogs.msdn.com/brada/archive/2008/04/04/framework-design-studio-published.aspx

 

FDS

In addition to the program itself you can download a 9 pages long excerpt from the book titled Framework Design Guidelines.

-t


WPF: Code in XAML -> Width={Binding Height}*2?

April 10th, 2008 . by Tobias

This posting consists of two sections:

  1. cool but not really useable
  2. really cool and usable

lets start with the non-usable stuff [Code in XAML]:

Whenever you declare your UI in XAML you've to attach event handlers in the code behind file, right? I expected that there has to be another way to attach code as XAML is just XML which is used to generate .cs (g.cs) files. And, tada, there is one:

    1 <Window x:Class="App1.Window1"

    2   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    3   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    4   Title="Window1" Height="300" Width="300">

    5     <Grid>

    6 

    7         <x:Code>

    8             <![CDATA[

    9               private void ClickMe(Object sender, RoutedEventArgs e)

   10               {

   11                   MessageBox.Show("This is embedded code from a CDATA section!");

   12               }

   13             ]]>

   14         </x:Code>

   15 

   16         <Button Content="Click me" Click="ClickMe" />

   17     </Grid>

   18 </Window>

let me cite Uri Geller: unbelievable ;) This will become a mess if there's more code involved. On the other hand: It should be possible to use this "approach" together with the XAML loader to implement a new type of plugin system: Your code gets part of the original code. Didn't test it yet and I hope it doesn't work as this might lead to new security holes.

Let's go on with the second, the really usefull, section [Width={Binding Height}*2]:

As there are a lot of guys out there who are a lot smarter than I, let me concentrate on pasting the following links without any error in this post :D:

Both present ways to define converters for WPF in XAML. Yeah, you got it right, no more one-line converters. Now you can create bindings which can not only bind to properties but can also calculate on those properties.
Once again: unbelievable.

I hope this post is as useful for you as the above links were useful for me.

Regards,

-t