• Products
  • Download
  • Purchase
  • Support
  • Company
Actipro Software company logo
Twitter Follow Actipro RSS Subscribe (RSS Feed)

The Actipro Blog

Tag Cloud

  • blog
  • docking
  • editors
  • intelliprompt
  • micro charts
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • views
  • web site
  • winforms
  • winrt
  • wpf

Latest Twitter News

May 14, 2012 at 2:50 PM
IntelliPrompt code snippet features have been added to our VS-like code editor control for #WPF and #Silverlight. http://t.co/1IchOJrr

May 10, 2012 at 9:40 PM
Our new Micro Charts control products for #WPF and #Silverlight are out now. Come build some dashboards with them! http://t.co/EEERvff0

May 7, 2012 at 6:47 AM
Today we look at bar charts, for our upcoming #WPF, #Silverlight, and #WinRT Micro Charts product. http://t.co/gxHuPS6B

May 4, 2012 at 6:25 AM
See a gallery of micro area charts in our upcoming release for #WPF, #Silverlight, and #WinRT. http://t.co/qDXGwW8B

May 3, 2012 at 6:32 AM
See a variety of line charts that are easy to make with our upcoming #WPF, #Silverlight, #WinRT Micro Charts product. http://t.co/mbkX6tJd

Twitter Follow us on Twitter

Month List

  • 2012
    • May (9)
    • April (6)
    • March (11)
    • February (11)
    • January (2)
  • 2011
    • December (2)
    • November (7)
    • October (2)
    • September (1)
    • August (5)
    • July (3)
    • June (6)
    • May (5)
    • April (8)
    • March (4)
    • February (5)
    • January (9)
  • 2010
    • December (9)
    • November (10)
    • October (4)
    • September (8)
    • August (12)
    • July (9)
    • June (7)
    • May (6)
    • April (7)
    • March (6)
    • February (6)
    • January (4)
  • 2009
    • December (2)
    • November (2)
    • October (12)
    • September (3)
    • August (11)
    • July (10)
    • June (6)
    • May (3)
    • April (7)
    • March (6)
    • February (8)
    • January (10)
  • 2008
    • December (10)
    • November (2)
    • October (3)
    • September (5)
    • August (5)
    • July (8)
    • June (4)
    • May (4)
    • April (10)
    • March (8)
    • February (1)
    • January (2)

Category List

  • RSS feed for ActiproActipro (321)
  • RSS feed for Blog SummaryBlog Summary (15)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (164)
  • RSS feed for New featuresNew features (155)
  • RSS feed for New productNew product (38)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (90)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (22)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (9)
  • RSS feed for WPFWPF (257)
  • RSS feed for XAMLXAML (23)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, Silverlight, and WinForms frameworks, and is most well-known for their SyntaxEditor syntax-highlighting code editor control.

Please take some time to learn more about us and our product offerings.

SyntaxEditor for WPF – Auto-showing a completion list when typing a new word

October 2, 2009 at 2:43 AM
by Bill Henning (Actipro)

One feature that has been requested from several customers is the ability to show a completion list in response to starting to type a new word.  This functionality can be seen in Visual Studio 2008.  It can be thought of the same as typing in a letter that is a new word, and clicking on the VS 2008 “Display an object member list” button.

Displaying a completion list in response to a language-specific character

A previous build already added a property into the document text changed event arguments called e.TypedText that is filled in only if the text change was caused due to a single typing operation, in which case it contains the text that was typed by the end user.  This allows you to handle that scenario (either via the SyntaxEditor.DocumentTextChanged event or via an IEditorDocumentTextChangeEventSink service implementation) and show a completion list when characters like “.” or “<” are typed.  Of course the characters you respond to depend on the language in use.

Here is a sample of how to display an JavaScript completion list in one of those handlers in response to a “.” character being typed:

   1: switch (e.TypedText) {
   2:     case "<":
   3:         // Open completion list session here
   4:         break;
   5: }

Note that the completion list code (defined elsewhere) is responsible for knowing what to show and when.  These features are already available in the current build. 

Displaying a completion list automatically when a new word is starting to be typed

We were thinking how could we make it easy so that customers can also optionally have their languages show a completion list when a new word is starting to be typed.  The event args already give you all the information you need to determine if a new word is being typed, however it does involve a few lines of tedious text scanning.  So we wrapped it all up into one handy property.  Here is the code you’d add to your switch statement above if you wish to support automatic display of the completion list for word starts:

   1: switch (e.TypedText) {
   2:     case "<":
   3:         // Open completion list session here
   4:         break;
   5:     default:
   6:         // If the text that was typed is a letter char that starts a word... 
   7:         if (e.IsTypedWordStart) {
   8:             // If no completion session is currently open...
   9:             if (!editor.IntelliPrompt.Sessions.Contains(
  10:                 IntelliPromptSessionTypes.Completion)) {
  11:                 // Open the completion list session here
  12:             }
  13:         }
  14:         break;
  15: }

The new e.IsTypedWordStart property is only true when a single letter character is typed and that letter is starting a new word.  The word determination code uses the IWordBreakFinder service defined for your language too.

This new feature will be included in the next WPF Studio 2009.1 maintenance release.

Tags: wpf, syntaxeditor, intelliprompt
Filed under: Actipro, In development, New features, WPF
Submit to DotNetKicks...
Permalink | Comments (0)

Related posts

SyntaxEditor for WPF - Advanced completion list filteringWe’re currently working on implementing completion lists in SyntaxEditor for WPF.  Comple...SyntaxEditor for WPF - Completion list text insertionWe’re sad to be ending SyntaxEditor “completion list” blog post week today. :)&nbs...SyntaxEditor for WPF - Completion list description tipsThis week has unofficially become “completion list feature” blog post week! :)  Mak...
Comments are closed
Copyright © 1999-2012 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us