Instant indentation in Visual Studio

29 04 2011

This is a kind of “tip of the day” which I should’ve shared sooner. One of the most common shortcuts I use in Visual Studio is this:

Ctrl+K Ctrl+D

This magic little piece of key-punching instantly and perfectly indents all the code on your current page. Go on, try it out. You’ll never manually indent code again.

If you would like to name your firstborn either Control-KD or Viktor junior, that’s ok.



Snipping databound properties

6 08 2010

Long time no see Internet! Hope your summer has been as good as mine and that you’re at least as caffeinated and motivated as I am.

1280965856882Snippets are almost as tasty as bacon, and less calories

I just learned about snippets and wanted to share this wonderful coding aid with everyone. Let’s Go!

Read the rest of this entry »

Silverlight 4 Webcam Demo

22 02 2010

During my visit to Finland last month, I got the opportunity to demonstrate some of the new features in Silverlight 4 in demo-form. Today, I’ll review the webcam demo.

Silverlight 4 webcam demo

Read the rest of this entry »

Silverlight 4 dropping, rightclick, printing demo

9 12 2009

For my presentation one week ago, I showed two demos. I thought I’d share one of those with you now. It’s calles “What we talked about at the christmas party” and highlights in a simple way, three new features of Silverlight 4; Dropping, right clicking and printing.


Let’s begin!

Read the rest of this entry »

Silverlight Out of Browser with new WebBrowser

27 11 2009

Today I’m making a demo application. It’s a simple PDF reader in Silverlight and it uses two new features. The Silverlight Out Of Browser (SLOOB) with elevated permissions, and the WebBrowser Control. Those of you who’ve written some WPF might already be familiar with the WebBrowser control and what it can do. In Silverlight, it’s basically an html-renderer for when you’re out of browser.


Read the rest of this entry »

Adding right-click functionality in Silverlight 4

24 11 2009

Not having the right mouse button available has been a hassle for both Silverlight and Adobe Flash since their inception. Flash has had the ability to customize their right-click context menu to some degree but never true right click event handling. With Silverlight 4, Silverlight will have true customizable event handling for the right mouse button. I know this might be a small step for event handling, but it’s a giant leap for rich Internet applications.


To do this in Silverlight 4, this is the code you’ll need to use:

Read the rest of this entry »

Scott Guthrie is coming to Sweden

18 11 2009

One of the .Net worlds most well-known personas ScottGu is coming to Sweden. He is giving a five (!) hour long lecture on VS2010 and other magical things the 2nd of December. Participation in the event is free. Go get registered now right…