This is one Silverlight 4 control I wanted to share. It extends the RichTextBox control in a way to add coloring of HTML and XML tags. The tags are colored as you type. I am planning also to add intellisense. It also has right click menu with Cut, Copy and Paste options for now but more can be added including custom links, activated by contextual position. Below you can see how a typical HTML looks when formatted:

This is the link to a demo page:

http://www.bodurov.com/XmlEditor/

And here you can find the complete source code:

http://xmlcodeeditor.codeplex.com/

In the source code you will also see a full set of tests. To see the tests when you load the project go to the /Tests folder of the project web site.

Continued...

I would like to present here one tool I have developed recently for visualizing vectors in three dimensions. The tool allowes not only to view vectors but also to share them with others. Check the "link to current vectors" for that.

You can view it only by visiting URL: www.bodurov.com/VectorVisualizer

The tool is build from scratch and does not use any 3D engine. In fact it includes a very simple light weight 3D engine for drawing lines in 3D. For the platform I chose Silverlight under C# as I find .NET to be the best coding environment.

If you want to dive deeper into the concepts that this tool is based on you can check my Simple Talk article at www.simple-talk.com/dotnet/.net-framework/building-a-simple-3d-engine-with-silverlight/

Continued...

Often in a Silverlight client you will need to delay the execution of a particular action. There is no intrinsic setTimeout function like in JavaScript window object but you can use System.Windows.Threading.DispatcherTimer object. If you are looking for a tidy wrapper around this object you may want to consider this solution:

Continued...

If you want to define the number and the type of Silverlight DataGrid columns at runtime you can use the following approach. The technique can actually be used not only for Silverlight but also anywhere where you have to transform IDictionary (for example Dictionary or Hashtable, SortedDictionary etc) into anonymous typed object with each dictionary key turned into an object property.

Continued...