Subscribe (RSS)

Quick Links

About Actipro

Actipro Software has been creating .NET user interface control products for Windows Forms since its inception. More recently, Actipro has become a pioneer in the .NET 3.0 WPF control development arena.

SyntaxEditor advanced XML language to get xs:any support for IntelliPrompt

by Bill Henning (Actipro) August 31, 2010 at 06:14

As mentioned in one of our previous posts, we’ve been working on a port of our SyntaxEditor Web Languages Add-on from WinForms to the WPF version of SyntaxEditor.  We’re finishing up some last features on it before it will be ready to launch alongside WPF Studio 2010.2 in the coming weeks.

The advanced XML syntax language implementation in the add-on allows you to specify XML schemas to use for validation and to drive automated IntelliPrompt for the end user.  In the previous post on the subject we showed how to create an XHTML editor in a few lines of code with automated IntelliPrompt popups.

One feature we just implemented was the ability to properly support xs:any nodes defined in the XML schemas.  xs:any allows a schema to indicate that elements from any, other, or specific namespaces can be included as content within another element.

Best of all, we ported this new functionality back to the WinForms Web Languages Add-on too!

Let’s see an example…

XsltWpf1

Here is the WPF SyntaxEditor showing an XSLT document loaded.  The XSLT is doing a transform to HTML.  In the screenshot the mouse is over the xsl:value-of element, showing a quick info tip.  Now let’s start typing a new start tag…  More...

July newsletter posted, with Actipro development plan

by Bill Henning (Actipro) July 1, 2010 at 09:41

We’ve just sent out our July 2010 newsletter to subscribers and have posted it online as well in case you are not a subscriber.

Newsletter

You can view the newsletter online via this link:

We list our development plan for the next several months at the end of the newsletter in its What’s next? section.

New WinForms SyntaxEditor and UIStudio maintenance releases

by Bill Henning (Actipro) June 29, 2010 at 06:32

We’ve just released new SyntaxEditor for WinForms and UIStudio for WinForms maintenance releases the other day.  The new SyntaxEditor build has numerous functionality updates, adds three new sample languages (C, C++, and RTF), and improves the .NET Language Add-on’s automated IntelliPrompt in Visual Basic.  Enjoy!

SyntaxEditor updates to dynamic lexers - feedback wanted

by Bill Henning (Actipro) July 20, 2009 at 03:45

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.

Latest UIStudio and SyntaxEditor for WinForms builds help prevent memory leaks

by Bill Henning (Actipro) July 13, 2009 at 06:09

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.

Docking & MDI for WPF - Improving WinForms interop

by Bill Henning (Actipro) December 11, 2008 at 23:22

We’ve had a lot of requests lately for improved support when using any sort of interop control (generally WinForms-based) within our Docking & MDI for WPF product.  In should be noted that interop content may also include things like DirectX content, etc.

The main problem is this, WPF renders any interop content on top of WPF content on the same root window.  The issues are described lower down in this topic:

http://msdn.microsoft.com/en-us/library/ms742522.aspx

In addition to the content rendering issues in WPF, there are some focus handling issues when dealing with interop controls.

What are we doing about it?

We have begun moving forward with finding ways to work around the above issues.  Today I’d like to talk about a new workaround included in build 482 that was just released.

One major issue with Docking & MDI was that auto-hide flyouts would appear below interop content that was located in the MDI area.  I’m happy to say that we’ve come up with a new property on DockSite that helps with this particular issue.

AutoHide

An auto-hide flyout (Tool Window 1) that shows on top of two documents with WinForms-based content

By setting the new DockSite.UseHostedAutoHidePopups property to false, you can now achieve auto-hide flyouts that appear above interop content.  In the screenshot above, you’ll notice a WPF tool window flys out on top of documents that contain a SyntaxEditor for WinForms control instance and a WinForms WebBrowser control instance.

We recommend that if you do not host WinForms content in your documents, you should still keep DockSite.UseHostedAutoHidePopups its default value of true.

This was very tricky to implement and is a major step forward for the product!

Moving forward

We still have some more areas to work on.  It’s likely that the next area will be a workaround so that the dock guides (when dragging a window) will appear on top of interop content.  Stay tuned!

WinForms products migrate to VS 2008 / VS 2005

by Bill Henning (Actipro) December 8, 2008 at 23:29

As of today’s releases of our Windows Forms products, we have dropped support for VS 2003 projects and .NET 1.1 builds of our component libraries.  At this point, VS 2008 has been out for some time and anyone doing Windows Forms development should be on .NET 2.0 or later.

The latest maintenance releases now have both Visual Studio 2008 and Visual Studio 2005 sample projects included.

All the component libraries are built targeting .NET 2.0.  Please note that libraries that target .NET 2.0, can be used in any later .NET framework as well, such as .NET 3.0 or 3.5.

SyntaxEditor .NET Languages Add-on's IntelliPrompt improvements

by Bill Henning (Actipro) September 7, 2008 at 23:32

 

We just released build 276 of SyntaxEditor and its add-ons.  This build has more general tweaks and bug fixes, along with some major updates to the IntelliPrompt capabilities for C#/VB via the .NET Languages Add-on.

Here are some of the major new updates.  There are a lot of small enhancements in IntelliPrompt across the board as well.

Anonymous Types

IntelliPrompt now works for anonymous types.  It will construct a type definition behind the scenes that contains the properties you specify and will use that type definition for constructing IntelliPrompt UI.

Anonymous

SyntaxEditor showing a member list for a property that is several levels deep in anonymous types

In the screen above, both abc and def are implicitly defined anonymous types.  You can see how SyntaxEditor correctly identifies the Now property on the abc anonymous type as a DateTime.

Extension Method Application

We have really enhanced the way that we determine which extension methods are applied to various types.  In previous builds there were a number of cases where extension methods could be applied to inappropriate types.  With our new code updates, the add-on attempts to resolve the parameters down to really determine if an extension method applies to a type, even if the type is a complex generic one.

Extension1 

A member list showing how extension methods are applied properly based on the source type

In the screen above, note how the AGoodTextExt extension method appears in the member list, while ABadTestExt does not since the latter is for enumerable int objects, not enumerable char objects.

Extension Method Quick/Parameter Info

The code updates also include some more updates to the quick and parameter info that is displayed for extension methods.  It will attempt to resolve the generic parameters into their "real" types for display to the end user.

Extension2

A member list showing how LINQ's Enumerable extension methods have been applied to a list variable, and how the quick info correctly displays the return value as IEnumerable<int>

In the screen above, the quick info used to say IEnumerable<T> in previous builds, but now says IEnumerable<int>.  We will be making other improvements in this area in the future.

Implicit Variable Declarations in VB

While our C# implementation has had var support for a while, we now have implicit variable declarations working in VB as well.

VBImplicit

A member list displayed for a variable that was implicitly declared

In the screen above, SyntaxEditor correctly displays the members for the ApplicationException type since that type was used to initialize the variable var.

SyntaxEditor .NET Languages Add-on IntelliPrompt Improvements

by Bill Henning (Actipro) July 14, 2008 at 20:15

We just released build 275 of SyntaxEditor and its add-ons.  This build has a lot of minor tweaks and bug fixes that have been made over the last 2-3 months.

In addition there have been some major enhancements in the .NET Language Add-on's IntelliPrompt capabilities.

Delegate Improvements

SEDelegates

A demo of how a delegate can be called like a method with full IntelliPrompt

 

Delegates now have full IntelliPrompt capabilities, just like calling methods.  Note how in the screenshot above, a generic delegate is called and a DateTime value is properly returned as the value.  The member list shows the members of the DateTime return value.

Generic Methods

SEGenMethods

A member list displayed for the result of a generic method call

Generic methods can have their return type defined by the parameter that is passed to them.  In the example above, a field called ADateProp which is of type DateTime, is passed as a parameter to the generic method Echo.  IntelliPrompt correctly recognizes that per the definition of Echo, the return type is also DateTime.

Constructed Types

SEConstructedType

Parameter info displayed for a method invoked directly off a constructed type

This feature has been highly requested... IntelliPrompt that functions on a constructed type expression.  In the screenshot above, the Append method's parameter info is displayed, following a new StringBuilder() call.

Beginnings of Lambda Expressions

SELambda

A member list displayed for a lambda expression variable

Lambda expressions are a new concept in the latest C# and VB updates by Microsoft.  In the example above, a member list is displayed for the x variable introduced in a lambda expression.  IntelliPrompt determines that x is a DateTime based on the Func<DateTime, bool> declaration.

Note that not all Lambda expression IntelliPrompt works at this time but we will continue to improve IntelliPrompt in all areas as we move forward.

Enjoy the updates!

SyntaxEditor Generic Method IntelliPrompt Enhancements

by Bill Henning (Actipro) April 9, 2008 at 03:12

The latest build 274 of SyntaxEditor's .NET Language Add-on includes several improvements for generic method support.

First, if you call a generic method (defined as T GenMethod<T>()) passing the generic parameter type like (GenMethod<int>().), the member list that is displayed will be for int.

GenericMethods

Demonstrates how the generic extension method ElementAt is applied to a string array twice and SyntaxEditor correctly recognizes the final return value is a char

Second, generic methods on extension methods now resolve types properly as well.  This is especially useful with Linq as you can see in the screenshot above.  Above, ElementAt is a generic extension method defined on Linq's Enumerable class.  The first time it is applied, the string type is returned and the second time it is applied, the char type is returned.

We still have a little more work to do with generic methods but these are some great steps forward!