We’ve been hard at work on WPF Studio 2010.2, which we should have out in September. One new product that will ship along side of it is a port of our Web Languages Add-on that we have for the WinForms SyntaxEditor.
This add-on has an advanced XML syntax language implementation that allows you to specify an XML schema set to provide validation and automated IntelliPrompt within the code editor, all with just a few lines of code. Let’s take a peek at a new HTML Editor demo we’re adding to WPF Studio to show off the add-on:

Here we have the sample that shows an XHTML document loaded. We’ve configured our advanced XML language with an XSD we downloaded from the W3C for XHTML. And with a few lines of code, voila, instant HTML editor!
Code outlining (folding) is fully supported and operates over block elements that contain other elements.
In the screenshot above, we pressed Ctrl+Space in the head element block and a completion list displays, showing the elements that are allowed within the head element per the XSD specification.
The XML language will even pull in documentation from the XSD and will display it in completion list description tips and quick info.

In this screenshot we’ve pressed Tab to auto-complete the script tag and then typed >. The end </script> was automatically inserted for us.
However now you’ll note a red squiggle under the script tag name. If you look in the Error List tool window, you’ll see a validation error that was found per the XSD data. The XML syntax language in the Web Languages Add-on automatically parses and performs validation whenever you change the document. SyntaxEditor allows all of this to occur in a worker thread so that the UI is never bogged down.

In this screenshot we’ve entered the type attribute to satisfy validation. And we’ve moved the mouse to hover over the title tag. An IntelliPrompt quick info tip displays showing the element’s name, namespace, documentation, and ancestor hierarchy.
Completion lists work for elements, element values (for simple types), attributes, attribute values, and more. Likewise, quick info will display for elements and attributes.
All the functionality above can be created in a few lines of code using the Web Languages Add-on that will ship along side of WPF Studio 2010.2.