Galin Iliev's blog

Software Architecture & Development

Silverlight 4: Setting a global application theme

I am creating a SL4 application and I was looking for a way to make more shinier. Of course themes come to play here but the big questions is “How to setup a global theme?”

Search results returned a bunch of ideas with a lot of code like merging dictionaries etc… And I was thinking it should be simple, very simple.

I came across this post about Silverlight4 Toolkit April 2010 release. But still what suggested there didn’t work for me:

<Application xmlns=""

For some reason the highlighted part failed come into play. No result was seen…

So I found this very, very simple way. Just put those two lines in App.xaml.cs:

using ActiveTheme = System.Windows.Controls.Theming.BureauBlackTheme;
private void Application_Startup(object sender, StartupEventArgs e)
    ActiveTheme.SetIsApplicationTheme(this, true);
    this.RootVisual = new MainPage();

Hope this helps,

Hands-on Lab: Silverlight 4 Line of Business Application using WCF RIA Services


screenshot1_2 If you want to dive in Silverlight 4 RIA services for Line of Business apps – there is your hands-on-lab (~31 MB). There is no more struggle, watching videos to see how to trigger some things. Thanks to Swiss MSDN team who developed 108 pages :) hands on lab manual – both in PDF and DOCX.

These features are implemented in the lab:

  • True multi-tier architecture.
  • Entity framework and service layer definition.
  • Data filtering, paging, sorting and grouping.
  • Data modification and validation.
  • Foreign key management.
  • Projections.
  • Programmatic printing from a Silverlight application.
  • COM interop with Microsoft Excel and running full-trust out-of-browser.

Prerequisites and used components:

Optional Components

The hands-on lab manual has detailed instructions on installing all the prerequisites.

Great job Swiss MSDN team


Silverlight 4 Podcast Pack with Tim Heuer

I’ve just found a great set of podcasts with Tim Heuer about Silverlight 4. It is not new now but for sure it is very interesiting. Here is the ToC

Overview: What are the core things to know about Silverlight 4?  How does it compare to Silverlight 3?
Controls: What are the new controls in Silverlight 4?  What new support is there for controls?
Out Of Browser: How do elevated privileges work?  What are toast notifications?  How can Html be hosted in an Out Of Browser application?
Printing and Webcam: How do the new printing/webcam APIs work? 
WPF vs Silverlight: With Silverlight 4, there are fewer differences between Silverlight and WPF.  How do we decide which technology to use?
Text Improvements: What are the big text and international improvements in Silverlight 4?
Networking: How do the networking changes in 4 impact Silverlight developers?  What new things can they do?
Databinding: How does the new Dependency Object support help designers?

Download podcast pack


Silverlight 4 Beta is here

At annual professional developer conference (PDC) in LA, CA was unveiled a Beta version Silverlight 4. After v3 added many new features and control v4 doesn’t change the pace and releases many new features.

Not only the new version produces 200% faster apps than v3 but continue to invest in Out-of-browser support which will be game changer in the way desktop applications are built. Now trusted applications has access to MyDocuments, MyMusic, MyPictures and MyVideos folder (or equivalent for non-windows platforms) but also has access to external programs as word processor or e-mail client as well as COM components.

Thus the programming mantra – “write/compile once and run everywhere” is getting close to the reality.


Getting started with Silverlight

Tim Heuer posted a great series of articles targeted a new Silverlight developers. These can be used to ramp up with new things in v3 as well as Silverlight concepts.

Original post here.

Silverlight Firestarter in Redmond

Recently there was a Silverlight Firestarter event in Redmond:

When you wake on Sept. 17th the year of 2009 you have a smile on your face. Not only did you get the day of for “training”, but the “training” is actually something you’re very interested in.  Maybe you haven’t had the chance yet, or you’re looking for additional guidance; but today you’re going on a tour of Silverlight 3, Expression Blend, SketchFlow, the Silverlight Toolkit, RIA Services and XAML Power toys.

Since this event is in the past there is still a way to catch up: Tim Heuer and Mithun posted videos from the event and I highly encourage all interested in Silverlight 3 to look at them.


Started silverlighting…

I haven’t blogged for a while since I have been enjoying non-typical sunny and hot summer here at Washington.

Now the summer is over and it is time to go back into tech area. Since you’ve noticed there are no WPF/Silverlight posts on my blog and this is about to change :)

I got new laptop and after installing recently released RTM of Windows Server 2008 R2 RTM and converted to workstation. For more details you can see previous posts. And of course it contains booting from VHD… multiple VHDs. I think this is great new feature that speeds up testing and playing with different technologies a lot…