Skip to main content


Showing posts from February, 2012

First gathering of LEAP Sweden 2012

I am back home in the couch after the second day on the first gathering of Microsoft LEAP Sweden 2012 . It has been two days packed with lectures on architecture and cloud computing. Without giving away too much, here are some short notes from this first gathering: In software arcitecture, knowing your patterns and practices is always a good thing. The same goes for best practices. SOLID is not a new concept, but it bears repeating! The future is all about bring-you-own-device , the cloud in general and  Azure  in particular. Also, the future is now! The Windows Azure HPC Scheduler is awesome for high performance computing scenarios where an extra boost is needed. You gotta love the elastic cloud! I will start working on a Rock Paper Azure bot this weekend and try to conquer the world. The speakers that shared this information with us were among others Patrik Löwendahl ,  Brian Prince  and of course  Björn Eriksen  that is organizing all of this. I am already l

Binding a HTML-formatted string to a WPF WebBrowser control

Sometimes there is a need to display a HTML formatted string in a WPF application. There are a couple of ways to do this, but the most stright forward is to use a WebBrowser control and the NavigateToString method. This approach has one big flaw, you cannot use binding to a string out of the box, but I found a great solution through Stack Overflow which adds a bindable property to the  WebBrowser  control using  NavigateToString . The following class is all that is needed to add that behavior. A new depencency property named Html is introduced to the  WebBrowser  and the proper change action is performed in the OnHtmlChanged method. public class BrowserBehavior { public static readonly DependencyProperty HtmlProperty = DependencyProperty.RegisterAttached( "Html", typeof(string), typeof(BrowserBehavior), new FrameworkPropertyMetadata(OnHtmlChanged)); [AttachedPropertyBrowsableForType(typeof(WebBrowser))] public static string GetHtml(WebBrowser bro