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

Silverlight 3: Someone pulled the switch too early?

March 14th, 2009 . by Tobias

SL3

This could be just a little reminder on Silverlight 3 (you know MIX 09 yadda, yadda, yadda) but perhaps it can be a little bit more for you.

Check out any download in Microsofts Download Center for Silverlight 2 and you will see something like the following on the "Thank You" page which appears after the download itself.

 Silverlight 3 Tools

Clicking on this link brings you to a "coming soon" page. Might this be true for everybody? Perhaps you can just adjust you user-agent string to get access? I don't know. If you have access to MS' intranet, it looks like you can download SL3 Tools from here (found via this one).

Sorry, just a litte teaser ;) And look out for LOB functionality in SL3.

Best regards,
 - tobias


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


WPF: Learn from Silverlight controls

March 10th, 2008 . by Tobias

Quicknote: If you are a wpf custom control writer(1), check out the sources for the Silverlight 2.0b1 controls released with mix08 keynote: Silverlight 2.0b1 controls. It is actually a whole vs2008 solution, so you can even "learn" how to create tests against custom controls.

BTW: The new -and right now "Silverlight only"- DataGrid is also included.

- tobias

(1) custom control != user control :D