Archive | March, 2010

New message in Outlook using Silverlight 4 and AutomationFactory

29 Mar

Silverlight 4 makes it possible to use the AutomationFactory (COM) to communicate with applications installed on the client computer.

To use the AutomationFactory it’s required that the application runs as an out-of-browser application with elevated trust. Furthermore it’s required that the user  can use the COM (the client must run on a Windows computer for COM to work – Microsoft have stated they are looking into getting COM+ support working in Silverlight 4 RTM on a Mac).


In the sample above I first of all check that the user is running the application with elevated trust and that the AutomatationFactory is available. I create a new dynamic object as an instance of Outlook and a new mail object. I set the To, Subject and Body on the mail object, saves it and finally sends it.

by xamlgeek

Restart your Elevated Trust, Out-Of-Browser (OOB) Silverlight App

29 Mar

Great article about restarting your elevated trust application.

by xamlgeek

ScriptNotify in Silverlight 4

29 Mar

Silverlight 4 introduces a WebBrowser control which I have written a short post about this control here.

In some scenarios it is necessary to get a response from the WebBrowser control – to do that you can use the ScriptNotify event on the WebBrowser control. The ScriptNotify occurs when the content contained in the WebBrowser control passes a string to the Silverlight plug-in by using JavaScript.

To demonstrate the functionality of ScriptNotify event, I have created a Silverlight 4 project and an ASP.NET webproject that hosts the Silverlight project. I have made the Silverlight project an out-of-browser application – this is necessary to display HTML in the WebBrowser.

On the server-side I have added an HTML-file called HTMLPage1.htm that will be the HTML-file that I displays in the WebBrowser. I have added a button to the page and added a JavaScript function called notify that is invoked when I click the button.


In the Silverlight project I have added a WebBrowser control on the MainPage.xaml and I have set the source to our HTML-page on the server.


In the code-behind I subscript to the WebBrowser’s ScriptNotify event and implement an EventHandler.


To invoke the ScriptNotify event from the HTML-file I need to pass a string to the Silverlight plug-in. The Silverlight hosting environment allows you to call Notify on the Window.external object and pass a string to the plug-in. When you do this, the ScriptNotify event occurs.


My ScriptNotify event catches the call from the JavaScript function and from the NotifyEventArgs in the EventHandler I get the string value sent from the JavaScript function.


You can download the demo project here.

by xamlgeek

Silverlight 4 workshop at ONUG

28 Mar

Tomorrow I am doing a Silverlight 4 workshop at ONUG. The workshop got focus on the new Silverlight 4 features and includes lots of training.

On Tuesday I am doing a similar workshop at ITU in Copenhagen. There are still some tickets available but there are limited seats. Read more and buy your ticket here (if you use discount code XAMLGEEK you will get 20 percent off).

by xamlgeek

T-shirts online at CodePlex

27 Mar

I have made the t-shirts online project available at CodePlex: Please feel free to download, contribute and comment on the project.

by xamlgeek

Silverlight 4 and DIBS: Introducing t-shirts online

26 Mar

As part of a presentation about paying using secure methods by DIBS, I had a short demo about integrating DIBS into a Silverlight solution. For demo purpose I made an online shop called “T-Shirts Online” in Silverlight 4.

You can see an online demo here and download the full source here (keep in mind that this is demo code!).

by xamlgeek


22 Mar

The playlist for the music that was played prior to the MIX10 keynotes:

Enth E Nd
Linkin park
Reanimation ( Bonus Tracks)

Beastie Boys
The Sounds of Science Disc 2

East Jesus Nowhere
Green Day
21st Century Breakdown

Icky Thump
The White Stripes
Icky Thump

The Arkhams
The Road To Arkham

Dammit ( Radio Edit)
Greatest Hits ( Edited )

Face Down
The Red Jumpsuit Apparatus
Face Down ( Single )

I Don’t Care
Worlds Collide

Somebody Told Me
Hot Fuss

A Lot Like Me
The Offspring
Rise and Fall, Rage And Grace

Where Do I Begin
The Chemical Brothers
Dig Your Own Hole

White Flag Warrior
Flobots feat.Tim McIrath Of Rise Against
White Flag Warrior

Paper Planes

Numb-Encore (Amended)
Jay Z
Collision Course ( Edit )

My December
Linkin park
Hybrid Theory ( Bonus Track )

Buzz Tracks
The Chemical Brothers
Setting Sun

Body Movin’ [Fatboy Slim Remix]
Beastie Boys
The Sounds of Science Disc 1

Last Night

Crystal Method
Divided By Night

Mr. Scruff
Ninja Tune

Gur Nalon Ishq Mitha
DJ Rekha
Basement Bhangra Compilation

Name Of The Game
Crystal Method

Come Back Clean ( Featuring Emily Haines)
Crystal Method
Divided By Night

Ooh Yeah
Last Night

Roll It Up
Crystal Method

Daft Punk

You can get the iMix from iTunes here:

by xamlgeek

Going to MIX10

12 Mar

Tomorrow I’m leaving for MIX10 in Las Vegas. There are lots of exciting sessions about Silverlight and Windows Phone 7 that I’m going to attend – only problem is the very limited time :)

See you at MIX!

by xamlgeek

Silverlight 4 workshop (marts)

9 Mar

For at give dig en kickstart til Silverlight 4, afholder vi endnu en Silverlight 4 workshop. Workshopen tager dig grundigt igennem de fleste nye features i Silverlight 4 og du vil få hands-on erfaring med mange af de nye features.

Læs mere og tilmeld dig via Eventbrite:

by xamlgeek

ASP.NET MVC 2 af Stig Irming-Pedersen

5 Mar

Onsdag den 17. marts 2010 har CNUG fået Stig Irming-Pedersen til at fortælle om ASP.NET MVC 2.

Med lanceringen af ASP.NET MVC sidste år og den snarlige lancering af ASP.NET MVC 2 har Microsoft taget et stort skridt fremad inden for webudvikling. I denne præsentation ser vi på filosofien bag MVC og hvordan ASP.NET MVC kan øge udviklerens produktivitet og arbejdsglæde. De grundlæggende bestanddele vil blive gennemgået og den nye funktionalitet i version 2 vil blive præsenteret.

Stig Irming-Pedersen er partner i Copenhagen Software, der leverer rådgivning om og udvikling af løsninger baseret på Software as a Service og Cloud Computing. Stig varetager til daglig  opgaver spændende fra webbaseret softwareudvikling over agil projektledelse til udarbejdelse af tekniske arkitekturer for SaaS produkter.

Tilmelding foregår via Eventbrite:

by xamlgeek