Porting from WPF to Silverlight: The Missing Pieces, Part 2

September 23, 2010

I bring you the sequel for the post found here. These are just more Silverlight 3 missing features I’ve needed while porting a WPF 3.5 application to Silverlight. So, without further ado: Style Setter Doesn’t Support Bindings Description: in Silverlight 3, a style setter can’t set a value to a binding. Solution by: David Anson http://blogs.msdn.com/b/delay/archive/2009/05/07/one-more-platform-difference-more-or-less-tamed-settervaluebindinghelper-makes-silverlight-setters-better.aspx http://blogs.msdn.com/b/delay/archive/2009/11/02/as-the-platform-evolves-so-do-the-workarounds-better-settervaluebindinghelper-makes-silverlight-setters-better-er.aspx In a nutshell: Instead of writing: <Setter Property="IsSelected" Value="{Binding IsSelected}"/> Use the code...

Porting from WPF to Silverlight: The Missing Pieces, Part 1

September 21, 2010

Recently I’ve been working on a port of a WPF 3.5 application into a Silverlight 3 web application. I came across many of the limitation of Silverlight 3 relative to WPF 3.5. Fortunately, I’ve found numerous excellent solutions throughout the blogosphere. These have helped me so much I would like to note them for all to see. Also, this list might come in handy to other people porting applications from WPF to Silverlight. One final note, the port was done from WPF 3.5 to Silverlight 3. Some of the issues might been solved in Silverlight 4 or have different solutions. No Commands Description:...

Fix Error: An attempt was made to load a program with an incorrect format

September 16, 2010

While trying to run the sample project ShellObjectWatcherSampleWPF from the latest version of Windows API Code Pack, I came across the following problem, both in Visual Studio 2008 and 2010: Or in a search-engine friendly way: “Cannot create instance of ‘MainWindow’ defined in assembly, ‘ShellObjectWatcherSampleWPF, Version=, Culture=neutral, PublicKeyToken=null’. Exception has been thrown by the target of an invocation.  Error in markup file ‘MainWindow.xaml’ Line 1 Position 9.” Checking the internal exception, revealed the following: "Could not load file or assembly 'Microsoft.WindowsAPICodePack.Shell, Version=, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An...

Windows API Code Pack v1.1 Released!

September 13, 2010

Last Tuesday (31.08.2010) Microsoft released a new version for the excellent managed library, Windows API Code Pack. For those who don’t know, this library serves as a managed wrapper for many Windows APIs which are not included in .NET framework, especially new features from Windows Vista and Windows 7. I’ve been working with this library for quite some time now and I must say it is “.NET missing piece”. Most of Windows features which doesn’t exists in .NET are at your fingertips =, without handling all the Interop stuff yourself. With the coming of .NET Framework...

Happy Blog Day #1

September 9, 2010

It has been a year since I’ve started blogging and I think this is a good point for thinking where I was , where I am and where I’m going. In this year I’ve written 46 posts. Not bad, but not nearly as much as I want or as much ideas I have for posts. Unfortunately, (or fortunately?) I enjoy my work so much that I often find myself practicing it on my spare time, leaving less time for blogging. The topics I’ve blogged about where mostly Windows 7 related features (over 70%), the rest is divided...
tags: ,
no comments