Tweets by @Actipro
Please take some time to learn more about us and our product offerings.
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.
August 26, 2010 at 09:22
SyntaxEditor for WPF - HTML editor sample preview
You've been kicked (a good thing) - Trackback from DotNetKicks.com
August 27, 2010 at 01:40
FeedBurner blog post RSS feed issue fixed
FeedBurner blog post RSS feed issue fixed
The Actipro Blog - WPF and WinForms Development
August 28, 2010 at 03:58
As a way of testing your parser framework, have you tried implementing the HTML5 tokenizing and parsing behavior?It's a good example of a complex real-world application with an open specification and could also provide some good tests for what the "intelliprompt" should show.
August 29, 2010 at 06:34
Not yet, and as a side note we still need to work on features that would allow language merging with the parser, which are scenarios that would be used with a real dedicated HTML parser. Those will likely be things we'll work on after the first WPF Studio 2010.2 release.
Bill Henning (Actipro)
August 29, 2010 at 13:06
This looks wonderful Bill. Do you anticipate porting this to the Silverlight SyntaxEditor as well?Cheers,James
August 29, 2010 at 15:44
Thanks! We may not port it to Silverlight at this time, the main reason being that it relies heavily on the XmlSchemaSet and related classes that are part of the .NET framework, and they have been left out of Silverlight. Without that framework, we cannot drive any of the automated IntelliPrompt features.
If we did port the XML syntax language, it would still provide an AST, code outlining, and some validation. But there wouldn't be any automated IntelliPrompt until Microsoft makes the XmlSchemaSet functionality available there. The core features may make it worth the effort though.
What do you think? Would you still like to see it on Silverlight, even if the automated IntelliPrompt can't be included at this time?
August 29, 2010 at 16:16
It would certainly still be useful (at least in my case) as generating an AST for the XML will be an excellent entry point for my own domain specific validation engine.