I've come to appreciate the new Visual Studio 2010 code editor IntelliSense features like Pascal case lookup and the narrowing list that is presented as you type. Unfortunately, these new code editor features did not make it into the XAML Editor. But not to worry…
Features
- Pascal case lookup
- Optional narrowing list filter
- Filtering based on item type
- xmlns IntelliSense options
- Show/hide only solution assemblies
- Show/hide schemas
- Filter settings persist for the current Visual Studio session
Pascal Case Lookup
Pascal case lookup is always enabled regardless of the narrowing filter option. When all of your text is upper case, this feature kicks in to quickly locate the item you are looking for. Note, this feature requires at least two upper case characters be entered before kicking in.
The below image demonstrates the Pascal case lookup:
Locating an assembly using the xmlns Pascal case IntelliSense is super fast.
Narrowing List Filter
When the narrowing list filter is enabled, it provides two features.
- Narrows the list of displayed items by only including items that contain your text
- List item selection priority
- Selects the first match that starts with your text
- Selects the first entry that contains your text
Narrowing List Filter Enabled | Narrowing List Filter Disabled |
| |
With narrowing enabled, see how easy it is to locate Grid.Row or Grid.RowSpan . | |
| |
List Item Type Filter
This was my original driving force behind writing this extension. I found myself frustrated when a type in XAML had 2 properties, 4 events and 75 namespaces listed in the IntelliSense listing. Problem solved.
Standard list of items, notice the multitude of namespaces that are listed.
Toggle the namespaces ToolBar button by clicking it and they are filtered for you.
The other ToolBar filter buttons work the same. The gray background is the enabled state. The white background with grayscale image is the disabled state.
xmlns IntelliSense
The below image demonstrates the two filter buttons in the xamls IntelliSense presenter.
- Show only solution assemblies is enabled
- Remove schema entries is enabled
Another way to locate your assemblies very quickly is demonstrated in the below image. There are two filter buttons in the default state and I entered WC to quickly find an assembly in my solution.
In the below image, I'm taking advantage of the narrowing filter to locate all assemblies that have the word media. When searching the text with this type of search, the entire entry line of text is searched including the assembly name inside the (…).
Extension Manager
To view your installed extensions, use the Visual Studio 2010 menu, Tools, Extension Manager…
From here, you can either disable or uninstall extensions.
You can also configure settings for extensions using the Tools, Options dialog.
Requirements
Visual Studio 2010 Release Candidate or later version.
This will probably work on Visual Studio 2010 Beta2, but I have not tested it.
Downloads
Source Code Please Read
If you elect to download the source and possibly modify to meet your needs, you MUST uninstall the Extension if you used the VSIX to install it.
Additionally, I got burned when I first started this project and I had been studying a sample on CodePlex. If you want to develop your own extension, be sure the following folder is cleared out before you start a new project. If you have a conflicting project, i.e., another IntelliSense extension in the below folder, you could get conflicts when debugging.
C:\Users\<your login in name is here>\AppData\Local\Microsoft\VisualStudio\10.0Exp\Extensions
How Does This Work?
I learned SO MUCH writing this extension. Over the next week or two, I'll do a blog post explaining this extension and what is so different about this extension and the extension samples on CodePlex.
Close
After the Visual Studio 2010 Launch Event, I'll make suggested changes and post a new version here and on the Code Gallery.
Hope you like this XAML Editor extension.
Have a great day,
Just a grain of sand on the worlds beaches.
Filed under: C#, Cider Designer, CodeProject, Extension, IntelliSense, Silverlight, VB.NET, Visual Studio 2010, WPF General