Tweets by @Actipro
Please take some time to learn more about us and our product offerings.
WPF Studio build 503 was just released and includes a lot of updates to our WPF products, some being major new features. I’ll review some of the big updates made to SyntaxEditor and Docking/MDI below.
In the previous builds, we called the object that performed lexical analysis a lexical parser. After preparing to add our new syntax/semantic parsing core framework, we renamed instances of the term “lexical parser” to “lexer”. This allows us to use the industry standard pair of terms “lexer” and “parser” going forward where a lexer is what performs lexical analysis, and a parser is what performs syntax/semantic analysis.
The addition of parser support to SyntaxEditor is a huge step forward for the product since it brings us closer to being able to implement the add-ons we have in our SyntaxEditor for WinForms product. What is a parser? As mentioned above, it’s anything that performs syntax/semantic analysis. Our additions in this build provide an automated mechanism where text changes in a document can auto-trigger a call to a parser via a worker thread to parse document text and return a result asynchronously. Most often, the result is some sort of AST, syntax error list, symbol tree, etc. We don’t yet have a grammar that will generate ASTs like we did in WinForms, however our parser mechanism is very open and easy to use. So it’s simple to wire up your own parser code or a call to any third party parse like MGrammar or ANTLR.
Two new QuickStarts have been added that show off how to create a basic parser for a language, have it called from a worker thread on text changes, and respond in the UI when the parse data result is returned asynchronously.
Magnetism is a feature that kicks in when dragging rafting windows or standard MDI windows. When the corners or edges of the window being dragged get close to another corner/edge, the dragged window will snap itself next to the stationary window. You have total control over the sensitivity of the magnetism and how far apart the windows will snap.
Docking windows now have a number of properties that help you use custom brushes for tab display in various mouse states. In addition to that, tabs can be tinted to any color. This allows for tabs to be easily rendered similar to those in OneNote. Via the use of this feature, you can also create blinking tabs to notify the user that attention is required.
Due to popular request, IMdiHost (the core MDI host interface implemented by both TabbedMdiHost and StandardMdiHost) now has a new PrimaryWindow property and PrimaryWindowChanged event. This property tells you the “main” document in the MDI area.
Icons will now show up on WindowControl, and accordingly on standard MDI windows.
That’s right, we’ve added eight new QuickStarts with build 503 to show off both new features and some other interesting existing features. Be sure to check them out.
Another new feature that we have added to our Docking & MDI for WPF product, is magnetism. This is a popular feature of the Dock controls in Actipro UIStudio and will be available in the upcoming WPF Studio release.
The magnetism features take effect when dragging and resizing undocked tool windows, as well as documents in the MDI area (standard MDI mode only). When magnetism is active, any undocked tool windows or standard MDI documents that are dragged will attempt to "snap" their corners to other nearby window corners. If a corner is not found nearby, then the dragged window will attempt to align to the edge of another nearby window instead. This makes it very easy for the end user to align windows in a column or row. Additionally, the resizing of windows will also use magnetism to "snap" edges to the location of other nearby window edges.
There are two new properties on the DockSite that can be used to customize the magnetism behavior. The first is MagnetismSnapDistance, which indicates the distance at which magnetism begins to snap windows being dragged. If this value is greater than zero, magnetism is enabled. If set to zero, then magnetism is disabled. Increasing this property's value, which defaults to 5, will increase the range over which the magnetism will work.
The other property is MagnetismGapDistance, which indicates the distance between windows that are snapped together via magnetism. If this value is greater than zero, there will be a gap between windows that are snapped together.
Again, these great new features will be available in the next build of WPF Studio.
We’ve started some work on doing updates to what are known as “dynamic languages” in SyntaxEditor 4.0. These languages allow you to define a lexer in terms of explicit and regular expression pattern groups and make it very simple to get syntax highlighting working fast.
In the next-generation framework we’re prototyping out with the WPF version of SyntaxEditor, we’ve renamed these to be called “dynamic lexers” instead, since for the most part, they just control how the lexer tokenizes and highlights text. Thus they can really be used with any language.
Anyhow, while we’re pretty happy with the XML format for defining dynamic lexers right now, we’d love to get additional input on new features you’d like to see or ideas for improvement. Please post your comments or email them over.
We've added support for icons to our WindowControl, which is a control that looks and acts like a Window and can mimic both normal and tool window styles.
Standard MDI windows in Docking/MDI for WPF, showing icons
WindowControl is used through our Docking/MDI for WPF product, but most notably when using the standard MDI host. So if you have an image source defined on a DocumentWindow or ToolWindow, it will show up in the associated standard MDI child window. If you are using the WindowControl directly, you can now specify an image source to be displayed.
This new functionality will be in the next maintenance release, build 503.
Lately we've been working on adding features to our Docking & MDI for WPF product. One area that we've just enhanced is customization of the document window and tool window tabs. You may have seen this feature in Office 2007 OneNote, which uses colored tabs.
This new feature will be in the next WPF Studio release (build 503).
We've added several properties to DocumentWindow and ToolWindow that can be used to customize the look of the associated tab, if any. You can explicitly define the brushes used for the normal, hover, and selected states. Alternatively, you can specify a tint color and the default brushes will automatically be tinted toward that color. In the image below, the document windows use a tint color and the tool windows explicitly define brushes for the various states. You can see that the document tabs use a gradient just like the default look.
With these new properties, you can define a SolidColorBrush that uses a ColorAnimation and produce a flashing effect. This can be used to alert the user that something needs their attention. We provide a sample that shows how this can be done using an attached behavior, which includes full source code. More...
As we move forward on new features for SyntaxEditor for WPF, the next feature area we’ve been focusing on is adding core support for triggering syntactic/semantic parsing (commonly called “parsing”) following document text changes. SyntaxEditor for WinForms has a very nice system for this that allows a worker thread to perform the parsing operations and then report back to the document when complete. It’s a core item for getting advanced IntelliPrompt features such as those found in our .NET Languages Add-on working.
Parsing can take time to perform since you generally use the phase to build a tree-based model of the document via an abstract syntax tree, along with performing syntax checking. More...
On Friday we released new builds of all our WinForms / ASP.NET products. The big updates were some enhancements to the renderer management framework that is used primarily in UIStudio and SyntaxEditor. All the controls in these products would attach to an event on the renderer they used (typically a default global renderer) that told them if a renderer property was modified. This way the control instances would know when to redraw themselves. The problem was that sometimes even after a control was done being used, unless you called Dispose on the control (which forced removal of the event tie), the control may still be retained in memory due to this event tie.
What we did in this new build is update our renderers to support a weak event pattern. All the controls now use that pattern, meaning that the event tie will no longer keep the controls in memory, thus helping prevent against any possible memory leak scenarios.
The SyntaxEditor for WPF product includes a Language Designer tool that helps you define some information about a syntax language and it generates C# or VB code for you that can be included in your project. The goal of the tool is to save you time, especially on tedious tasks related to building a language.
The current version of the tool, while helpful, still is nowhere near where we envision taking it. We have a lot of plans for it and in this post I’d like to reveal a prototype of one of the next features we hope to add in the future: the Language Template Builder.
The concept of the new wizard is this. When starting to develop a new syntax language, you’d run this wizard. It would ask you some general questions about your language. After you finished the wizard, it would auto-generate some of the language project for you, based on your answers.
The Line Terminators and Identifiers configuration page
Above you can see a page that is asking about if line terminators are significant in your language and also, the general pattern for identifiers. More...
In a couple past blog posts, we talked about how as of build 501, syntax languages implemented the service locator design pattern. The Syntax languages to be service locators topic discussed the generics-based implementation of the service locator pattern and how we also added extension methods so that the most commonly used “services” could easily be registered and retrieved.
We had implemented these extension methods in build 501 using a trick (since SyntaxEditor targets .NET 3.0) but later found a problem with that trick. Thus build 502 fixes the problem introduced in build 501. More...
The latest maintenance release of WPF Studio (build 501 that came out today) includes several enhancements and bug fixes in the Editors for WPF product. We've already discussed the new TimeSpanEditBox control, but some of the other key updates are described below. More...