Archive | November, 2009

Talk about RIA Services

18 Nov

This afternoon I did a talk about .NET RIA Services and about building data-driven applications with ASP.NET and Silverlight.

You can get the slides and demos here:

At the same time on the other side of the world, the keynote on day 2 at PDC09 was taking place. At the keynote Scott Guthrie presented Silverlight 4 beta including WCF RIA Services beta.

WCF RIA Services does not require Silverlight 4 beta – it is targeted Silverlight 3 development.

You can read a lot more about WCF RIA Services here where you also can get the bits, watch videos, get samples and of course get the documentation.

I’m really looking forward to get into the details of the WCF RIA Services beta (and of course of Silverlight 4 beta) – and I will keep you posted ;)

by xamlgeek

Silverlight 4

18 Nov

At the PDC09 in Los Angeles, Microsoft unveiled a beta version of Silverlight 4. There are lots of new really cool features including

  • printing support,
  • WCF RIA Services (previously called .NET RIA Services),
  • HTML within the application,
  • offline DRM,
  • access to My Documents folder,
  • interaction with desktop applications like Office

Read the full beta information here where you also can download the beta and related tools.

Tim Heuer has written a great guide to the new features here. Channel 9 have provided some Silverlight 4 training that you can get here.

Notice that there is no go-live license with Silverlight 4 beta!

by xamlgeek

Subtitles in a MediaElement

16 Nov

Loading subtitles to MediaElement in Silverlight is pretty easy but there are some features that you need to be aware of.

You associate a list of subtitles to a MediaElement by adding Markers to the MediaElement.

    x:Name="MyMediaElement" />

    new TimelineMarker()
        Text = "xamlgeek made this subtitle",
        Time = TimeSpan.FromMilliseconds(1000)

To display the subtitle on an UI element like a formatted TextBlock you need to subscribe to the MarkerReached event on the MediaElement. This event will be fired when the media reaches the marked on the specified timespan.

MyMediaElement.MarkerReached += (se, ea) =>
    MySubTitleTextBlock = ea.Marker.Text;

But there is one minor problem that you need to be aware of when building more complex media applications. If you add a TimeLineMarker to a MediaElement before the MediaOpened event is fired, the Markers will not trigger the MarkerReached event.

You can take a look at to see a running media application using subtitles as described above.

by xamlgeek

Free seminar about Silverlight

15 Nov

In February I’m talking at a 2-hour seminar at Øredev Knowledge Network. You can read more and enroll here:

by xamlgeek

Silverlight, Prism & .NET RIA Services

13 Nov

In these days I’m working on a project for a Danish media company. The project is pilot showing the possibilities with the FAST search engine. On top of the FAST search engine we are building a Silverlight client showing the result. From here the user and dive deeper into the results or work with results.

To make the Silverlight client as modular and flexible as possible I have used PRISM to split the content into modules and the eventaggregator inside PRISM to make the modules disconnected from eachother and selfcontained.

I have implemented .NET RIA Services as middle tier to transfer the search result from the FAST search engine to the Silverlight client. Even though .NET RIA Services works great and seems really stable, there are some bugs and missing features. I’m looking forward to the official beta of .NET RIA Services next week :)

All-in-all I was a bit exited about this setup and if it worked. Even though I’m not through with the project, the technologies seems to work great together. I’m not sure that I can post deeper technical stuff about this project, but maybe some fragments will be available.

Next week (18th December 2009) I’m hosting a talk about .NET RIA Services – more about that here.

by xamlgeek

Get on the Bus – MCT Edition

8 Nov

This Friday I attended the “Get on the Bus”-tour in Copenhagen, Denmark. The crew was great, enthusiastic and held some really cool and intense talks.

The crew was on their way to TechEd09 in Berlin. If you get a chance to hear any of them talk you should grab it!

by xamlgeek

Stretch content in an AccordionItem

1 Nov

One of the controls that you can get for free with the Silverlight Toolkit is an Accordion. It represents a collection of collapsed and expanded AccordionItem controls.

If you wish to add content to your AccordionItems you just put it inside the AccordionItem tags. If you wants to stretch your content inside the AccordionItem you need set the Horizontal-/VerticalContentAlignment=”Stretch on the AccordionItem. If you just set the Horizontal-/VerticalAlignment it wont have any effect.

<layouttoolkit:Accordion ExpandDirection="Left"
    <layouttoolkit:AccordionItem Header="Hello World"

The reason why you need this approach is because the ControlTemplate of the AccordingItem is using TemplateBinding to set the Horizontal-/VerticalAlignment.

HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" 

by xamlgeek