Second Stanza

May 2, 2009

Second Stanza Source Code Repository

Filed under: .NET Development, Silverlight — dfbaskin @ 11:46 am

I’ve created a project on CodePlex to store the source code I’ve publish within this blog. The project is located at secondstanza.codeplex.com. The first set of source code is a set of useful Silverlight controls. Enjoy!

April 29, 2009

Detecting Design Mode in Silverlight Controls

Filed under: Silverlight — Tags: — dfbaskin @ 10:26 am

Here are a couple of links about the issues with detecting when a control is design mode (within Expression Blend or Visual Studio):

February 5, 2008

Silverlight 1.0 Source Code Viewer

Filed under: Silverlight — Tags: , , — dfbaskin @ 8:48 pm

One of the purposes for this blog is to post source code that might be helpful to the development community. I wanted to create a simple viewer for the source code I will be posting (I get tired of downloading .zip files just to look at the two lines of code I’m interested in).

Also, being interested in Microsoft’s Silverlight platform, implementing a source code viewer using this new technology would be a good introduction to this platform.

So here’s a first whack at the viewer implemented in Silverlight 1.0. Unfortunately, it requires Internet Explorer at this point. FireFox has an issue with the <!DOCTYPE> statement and I need to update the javascript event handling and DOM methods to support FireFox. Opera, at this point, doesn’t support Silverlight.

Of course, Silverlight 1.0 is pretty basic. It doesn’t contain any form-type controls (like a text box control) and I ended up writing a lot more Javascript than I wanted to. I’m looking forward to the feature set of Silverlight 2.0, including making use of .NET languages and having a wrapper around the DOM object model.

However, the bottom line is that Silverlight 1.0 is still pretty capable. The implementation requires downloading a single zip file from the server, which contains the HTML-formatted source code and an index file. The formatted code is generated off-line using GeSHi. A separate zip file contains the original source code.

I hope to improve this with Silverlight 2.0 by eliminating the HTML-formated zip file and perform the syntax highlighting at the client.

Download / View Source Code
(View requires Microsoft Silverlight 1.0 and Internet Explorer)

« Newer Posts

Create a free website or blog at WordPress.com.