Thursday, May 22, 2008

Best scrollbar ever!

Last week I installed an addon to Visual Studio that replaces the old, gray scrollbar. RockScroll gives you a preview of your current file an it really rocks! :)

http://www.hanselman.com/blog/IntroducingRockScroll.aspx

RockScroll

Wednesday, May 21, 2008

I miss some interfaces

I don't think I'm the only one that misses some interfaces in the .NET framework. A while ago I worked with a graphics framework written in .NET and I wanted to create a generic class that would handle different types of data items collection. The type would be byte, int, double, Decimal and so on. The class should then be able to perform some calculations.

Now, the problem with generic classes is that it is generic. You should be able to put in any type and the class will work. But, one thing you can do is set some constraint on your generic class and only allow types implementing a specific interface or only value type/reference type. You do this by setting:

public class MyClass<T> where T : IMyInteface

Now the problem in my situation was that I wanted do perform calculations using standard value types. Ok, I could set that the generic type must only be a value type, but that wouldn't solve any of my problems. The real problem is that there is no interface for addition, subtraction... This means that you can not use generic classes and calculation :/. I had to limit my data type to double (or copy the class and implement the same class for byte, int).

My question is, will we see an interface for mathematical operations in the .NET framework?

Bilden “http://www.multisensory.biz/catalog/images/small%20maths%20symbols.jpg” kan inte visas, då den innehåller fel.

Thursday, May 15, 2008

Use DirectX in WPF

Yesterday I wrote about hardware accelerated effects in WPF 2D. Today I saw this video (http://channel9.msdn.com/Showpost.aspx?postid=403854) that show us that DirectX can be used from WPF. There are some (a lot!) differences between DirectX and WPF 3D and you might reach some point where WPF 3D isn't enough, you need the power of DirectX. Instead of a huge rewrite of WPF to DirectX, you can now combine these two and that is just soooo cool! I love it!

 

image

9 different DirectX sample apps running on a cube each. Displayed in WPF 3D!

Wednesday, May 14, 2008

WPF Effect on the GPU

This is just so cool! Now with .NET 3.5 Sp1, visual effects running on the GPU can be created and applied to WPF-components. There will be a set of effects provided for you like shadow and blur, or you can create your own with HLSL. The hittesting will still work and if the target computer can't handle shader language 2.0 or higher, it will automatically switch to software rendering.

To apply an effect you only need to write:
<Button ... >
    <
Button.Effect>
        <
DropShadowEffect />
    </
Button.Effect>
   
Hello
</Button>

Read more about WPF and GPU Effect here (it is a very good series of post): http://blogs.msdn.com/greg_schechter/archive/2008/05/12/a-series-on-gpu-based-effects-for-wpf.aspx

 

Motion blur:

image

image

Friday, May 9, 2008

Dotway Seminar: Painless migration to Silverlight 2.0

This summer the next highly awaited version of Silverlight will be released. New functionality, new languages and new ways to interact with the web. We will explain the most interesting news and show, with concrete examples in Silverlight and ASP.NET, what is needed to reap the benefits of these features. We will also show how to handle the transition to Silverlight 2.0 in a straightforward and painless way.

  • The news in Silverlight 2.0
  • The integration with ASP.NET and other techniques
  • The advantages with using Silverlight compared to other web client frameworks
  • The painless transition to Silverlight 2.0
    • For the customer
    • For the developer

 

Speakers:
Carl Kenne
Lars Sjögreen

Time:
2008-05-14 (Wednesday)
Kl. 17.00 - 18.30

Location:
Kompetenscenter Stockholm, Vasagatan 8-10

More info and Registration:
The seminar will be presented in Swedish.
www.dotway.se

Price:
Free

Programming languages:
C#
JavaScript
HTML

Technologies:
.NET
WPF
AJAX
Silverlight

image