Archive | February, 2010

Visual Studio 2010 RC available for everyone to download

11 Feb

Visual Studio 2010 RC is now available for everyone to download. Read more at Jason Zander’s blog:

http://blogs.msdn.com/jasonz/archive/2010/02/10/visual-studio-2010-net-framework-4-rc-ready-for-general-download.aspx

or go directly to the download site:

http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

by xamlgeek

CNUG har rundet 300 medlemmer

10 Feb

Så skete det! CNUG (Copenhagen .NET UserGroup) har rundet 300 medlemmer! Det er jo intet mindre end fantastisk! :)

Vi har også fået et nyt medlem i kernegruppen – Thomas Juul. For dem der ikke ved det, er kernegruppen dem der knokler for at oprette og afvikle arrangementerne i CNUG. Kernegruppen består nu af:

Vi har en række gode arrangementer klar i de kommende måneder. I kan altid se en liste over kommende CNUG arrangementer på http://cnug.eventbrite.com/.

by xamlgeek

Visual Studio 2010 RC

9 Feb

Visual Studio 2010 RC is now available to MSDN subscribers.

http://weblogs.asp.net/scottgu/archive/2010/02/08/vs-2010-net-4-release-candidate.aspx

There are some know issues – one of them is Silverlight 4 projects are not yet supported.  “We will be adding VS 2010 RC support for SL4 with the next public Silverlight 4 drop. If you are doing active Silverlight 4 development today we recommend staying with the VS10 Beta 2 build for now.”

by xamlgeek.dk

Localization in Silverlight

8 Feb

It’s pretty easy to use localization in Silverlight using resoucefiles (http://msdn.microsoft.com/en-us/library/cc838238(VS.95).aspx and http://msdn.microsoft.com/en-us/library/dd882554(VS.95).aspx). Instead of using resource files it’s possible to use a database and WCF RIA Services to retrieve the localized strings. The following is an example of how to do it.

The server part

First of all I have created an entity to represent my datamodel – the entity is called LocalizatoinItem and have three properties: Key (string), Value(string) and Language (string).

LocalizationItem

To retrieve the data from the database I have created a repository called LocalizationRepository. The repository retrieves and cache data on the server.

LocalizationRepository-1

To get data in this example I have created a method to generate the it.

LocalizationRepository-3

WCF RIA Services make it easy to get data on the client from the server. To enable this, I have created a DomainService called LocalizationService. It contain a method to retrieve an IEnumerable of LocalizatoinItems.

LocalizationService

The client part

On the client side I have a class to maintain the state of the application – I have called it ApplicationState. It has a static property called Current that holds an instance of the class and a property called LocalizationStrings that will hold a list of the localized strings.

ApplicationState

When the application starts up I call the GetLocalizationItems method on the server to retrieve the localized strings. When the list of strings is retrieved I set the property in the current instance of the ApplicationState and set the RootVisual.

App

To use the localized strings in XAML I need to use DataBinding and a ValueCOnverter called LocalizationValueConverter. The ValueConverter will retrieve a specific string from the list of localized strings based on the parameter sent to the converter.

LocalizationConverter

In XAML I have made a reference to the LocalizationValueConverter.

xaml-2

To bind the strings to a TextBlock I use DataBinding and sent the key I wish to use as parameter to the LocalizationValueConverter.

xaml-1

Finally I have set the DataContext on the page to trigger the DataBinding.

MainPage

It’s properly possible to make some shortcuts compared to the steps above – but it works.

Code is available here.

by xamlgeek

2 days of Surface training

8 Feb

I have just completed 2 days of Surface training at Microsoft, Vedbæk. The training was done by Dr. Neil Roodyn from NSquared and hosted by Ole Kjeldsen from Microsoft, Denmark.

The training was instructive and I learned about the design principals of touchable applications. Furthermore it was great to talk to other Surface developers.

I have created a group for Surface developers in Denmark at LinkedIn – read my post about it here.

by xamlgeek

Expression Blend for udviklere

8 Feb

Expression Blend er en del af Microsoft Expression Studio, der er Microsofts produktpakke til designere. Selvom Expression Blend primært henvender sig til designere, kan der være en enorm fordel for udviklere i at have et godt kendskab til Expression Blend. Hvis Expression Blend udnyttes rigtigt kan det spare mange timers udvikling.

Gennem de kurser jeg løbende afholder i Silverlight, ser jeg en tydelig begejstring fra deltagerne i de muligheder de ser i Expression Blend.

Torsdag den 25. februar 2010 afholder jeg et heldags kursus for udviklere, der allerede kender til Silverlight og/eller WPF, men som godt vil have et større kendskab til Expression Blend og de muligheder det giver.

Læs mere her: http://www.eventbrite.com/event/561491436 

by xamlgeek