Sunday, March 29, 2009

Precode plugin for Live Writer now has support for SyntaxHighlighter 2.0

I wrote about the excellent Precode plugin for Windows Live Writer in this blog post. Until recently there was no support for Syntaxhighlighter 2.0 and after inserting a snippet with Precode I had to manually modify the generated HTML. Finally, support for Syntaxhighlighter 2.0 was added with the just released version 4.0.2 and this inconvenience is now gone.

This new release also includes a standalone desktop application that will allow you to paste formatted code in other applications:

precode_desktop

NOTE: This release of Precode only has support for Syntaxhighlighter 2.0.

Now, go get Precode.

Saturday, March 21, 2009

Using the Silverlight Charting control with WPF

You have probably already seen the great charting control that is part of the Silverlight Toolkit. I don’t know for you, but I have on many occasions looked at these beautiful charts with envy. And really, who doesn’t want to have impressive charts in his application these days. And I wondered if I could use these nice charts in my WPF applications. The first idea that occurred to me was that I could host a Silverlight application in my WPF application using the WebBrowser control. However, this approach seemed somewhat hacky to me so I started looking if I could build the Silverlight charting control against WPF. It seems, however that the guys from the Silverlight team had also thought of that and they even have their daily builds setup to build the Silverlight charting against WPF.

So here is Delay’s chart builder sample that you have already probably seen running on Silverlight, but this time running on my desktop with WPF:

ChartBuilder

The sample includes all assemblies necessary.

You should note that to use the Silverlight charting control with WPF you must have a reference not only to the DataVisualization assembly, but to the WPFToolkit assembly or you will get some strange errors. This is because the control uses the the Visual State Manager that is being ported to WPF.

Happy charting.