• 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

Twitter Feed

Tweets by @Actipro

Month List

  • 2013
    • May (5)
    • April (7)
    • March (9)
    • February (2)
    • January (7)
  • 2012
    • December (4)
    • November (7)
    • October (5)
    • September (7)
    • August (5)
    • July (9)
    • June (11)
    • May (12)
    • 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 (401)
  • RSS feed for AppsApps (7)
  • RSS feed for Blog SummaryBlog Summary (19)
  • RSS feed for Customer ShowcaseCustomer Showcase (1)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (194)
  • RSS feed for New featuresNew features (207)
  • RSS feed for New productNew product (56)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (142)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (28)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (39)
  • RSS feed for WPFWPF (314)
  • RSS feed for XAMLXAML (34)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, WinRT XAML, 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 - Advanced completion list filtering

February 9, 2009 at 12:27 AM
by Bill Henning (Actipro)

We’re currently working on implementing completion lists in SyntaxEditor for WPF.  Completion lists are basically the mechanism used to provide “complete word” and “member list” functionality found in applications like Visual Studio.

CompletionList1

SyntaxEditor for WPF with a standard completion list displayed for the Foo class

While we’re covering all the basics associated with such functionality, we’re taking functionality to the next level in our implementation.  One area in which we’re delving is advanced completion list filtering.

What is filtering?

Normally completion lists appear like in the screenshot above.  They are a list of items and as you type in the editor, the selected item in the completion list is updated to reflect the item that most closely matches what you have typed.  You then can press Tab or Enter to insert the complete text associated with the item.  They help increase the productivity of end users while typing.

Completion list filtering is a feature that allows the presented items in the list to be filtered down.  This is most useful when you potentially have hundreds of items in a completion list and want the ability for the end user to narrow down the items that are displayed.

SyntaxEditor for WPF contains a feature-rich model for supporting filtering, as we’ll discuss below.

Adding filters to a completion list session

Each time a completion list is displayed, it is called a session.  The session has a large number of properties available that allow you to completely customize its behavior.  One such property is a collection of filters.

Each filter is simply an object that has a Filter method which can return whether an item should be excluded from the displayed items.  The simplest implementation of a filter would be programmatically activated and deactivated by you, the developer.  When active, the filter is applied to the items.

But what if we want to give the end user control of which filters are active?  SyntaxEditor has some very nice features for allowing this, where each filter can tell the completion list how UI should be created to support toggling of the filter.

Filter buttons

One option for filter UI is the creation of a toggle button.  If the toggle button is checked, the filter is not applied (because filters exclude items).  When the toggle button is unchecked by the end user, the filter becomes active and is applied.

CompletionList2    CompletionList3

A completion list where several filter buttons have been auto-generated for the UI

In the screenshots above, the left completion list shows the default unfiltered view.  In the right completion list, the method filter has been activated, thereby excluding all members from the list.

Each filter button supports a tooltip so that the end user can hover over it with the mouse to get a better explanation of what it does.

Filter button groups

What if you have multiple “groups” of filters and want to separate them somehow in the UI?  No problem, each filter can be assigned a group name.  The UI generator automatically appends separators between groups.

CompletionList4    CompletionList5

A completion list where there are two groups of filter buttons

In the screenshots above, a second group containing a single Inherited filter button has been added.  Note the separator between the two groups.

In this sample, when the Inherited button is unchecked, it excludes all members that were inherited from Object. 

It is important to note that anything can be placed in the content of these filter buttons.  You could do images and text if you wished.

 

 

 

Filter tabs

Tabs are another sort of UI that can be generated for filters.  With tabs, the related filter is applied only when the tab is selected.  There is a special “All” tab that can be added that deactivates any filters that are applied by tabs.

CompletionList6    CompletionList7

A completion list that shows two filter tabs

In the screenshots above, the left completion list has its “All” tab selected meaning the Public members filter is not applied.  If we click the right tab, the Public members filter is applied.

Combining buttons and tabs

Want to combine both filter buttons and tabs?  No problem, SyntaxEditor can handle it all!

CompletionList8    CompletionList9

A completion list showing both filter buttons and filter tabs

In the screenshots above, the left completion list shows all filters deactivated.  The right completion list shows only public members (due to the filter tab selection) and does not show the IntValueChanged event due to the unchecked Events filter button.

Customizability is key

 

The screenshots above all illustrate how we plan on implementing member list filtering when we get past the core SyntaxEditor for WPF development and into development of a .NET Languages Add-on version that can be used with it.

It’s rather easy for anyone to create filters just like above because you have total control over what filters are available and how they should be generated in the UI. 

We foresee each language developer using our extensible object model to make customized filters for each language and in some cases, context within a language.  For instance, this walkthrough showed a member list.  However if we are editing C# and want to shows namespaces, types, and members, you may wish to have a completely different set of filters displayed.

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

Related posts

SyntaxEditor for WPF - Completion list text insertionWe’re sad to be ending SyntaxEditor “completion list” blog post week today. :)&nbs...SyntaxEditor for WPF – Auto-showing a completion list when typing a new wordOne feature that has been requested from several customers is the ability to show a completion list ...SyntaxEditor for WPF - Completion list description tipsThis week has unofficially become “completion list feature” blog post week! :)  Mak...
Comments are closed
Copyright © 1999-2013 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us