Visual Studio 2010 XAML Editor IntelliSense Presenter Extension

Current Version:  2.0 (14 April 2010)

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…

FullControls FullProperties

FullNamespace

Features

  • Pascal case lookup
  • Optional narrowing list filter
  • Filtering based on item type
  • Toggle narrowing filter Hot Key (ALT + .)  (ALT PERIOD)
  • Toggle namespace filter Hot Key (ALT + ,)  (ALT COMMA)
  • xmlns IntelliSense options
    • Show/hide only solution assemblies
    • Show/hide schemas
  • Filter settings persist for the current Visual Studio session

New In Version 2.0

  • Added hot key toggling for namespace filter (ALT + ,) and narrowing filter (ALT + .)
  • White listed x: when narrowing filter is enabled to ensure that it’s always listed
  • Corrected the double clicking of the presenter to not select when the scroll bar is double clicked.
  • Publishing the presenter from the Visual Studio Gallery.  (I removed the code and presenter from my Sky Drive)

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 feature locates entries that start with the first upper case character you entered, then matches on additional upper case characters.

The below image demonstrates the Pascal case lookup.

PascalLookupOne

Locating an assembly using the xmlns Pascal case IntelliSense is super fast.

PascalLookupTwo

Narrowing List Filter

When the narrowing list filter is enabled it provides two features. 

You can enable/disable this feature by clicking the Filter icon or by using the hot key (ALT + .) (ALT PERIOD).

  • 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
NarrowingEnabled NarrowingDisabled
With narrowing enabled, see how easy it is to locate Grid.Row or Grid.RowSpan.  
NarrowingEnabledTwo  

List Item Type Filter

This was my original driving force behind writing this extension.  Was found myself frustrated when a type in XAML has 2 properties, 4 events and 75 namespaces listed in the IntelliSense listing.  Problem solved.

New in version 2.0 is the addition of the namespace filter toggling hot key (ALT + .)  (ALT PERIOD).  This hot key is tied to the namespace icon, making it faster to show/hide namespaces.

Standard list of items, notice the multitude of namespaces that are listed.

Namespaces

Toggle the namespaces ToolBar button by clicking it and they are filtered for you.

NoNamespaces

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.

xmlnsOne

Another way to locate your assemblies very quickly is demonstrated in the below image.  The two filter buttons in the default state and I entered WC to quickly find an assembly in my solution. 

This is another example of the Pascal case filtering.

xmlnsTwo

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 (…).

xmlnsThree

Extension Manager

To view your installed extensions use the Visual Studio 2010 menu, Tools, Extension Manager…

ExtensionManager

From here you can either disable or uninstall extensions.

 ExtensionManager

You can also configure settings for extensions using the Tools, Options dialog.

ToolsOptions

Requirements

Visual Studio 2010

Upgrade Installation

If you have a previous version of the XAML IntelliSense Presenter, use the Visual Studio Extensions Manager and uninstall the previous version.

The use the Visual Studio Gallery to install the new version.

This step won’t be required in the future.

Downloads

XAML IntelliSense Presenter on the Visual Studio Gallery

Source

In a few weeks, I’ll publish a blog post with the source and how the presenter works.

Close

Enjoy this XAML Editor extension.

Have a great day,

Just a grain of sand on the worlds beaches.

34 Responses to Visual Studio 2010 XAML Editor IntelliSense Presenter Extension

  1. [...] Karl has what looks like a fantastic extension to the XAML editor in VS2010 here. Posted Mon, Mar 22 2010 8:26 AM by mtaulty Filed under: .NET, WPF, Silverlight [...]

  2. [...] Visual Studio 2010 XAML Editor IntelliSense Presenter Extension (Karl Shifflett) [...]

  3. [...] IntelliSense for is operator should filter to types known to subclass the referenced [...]

  4. [...] Visual Studio 2010 XAML Editor IntelliSense Presenter Extension « Karl On WPF – .Net [...]

  5. marcoragogna says:

    It looks great, I will try as soon as VS2010 will be released (less than 20 days now, hurrah :D )

  6. [...] Shiflett: Visual Studio 2010 XAML Editor IntelliSense Presenter Extension Published Wednesday, March 24, 2010 4:53 PM by Rob_Relyea Filed under: XAML [...]

  7. bnaya says:

    Great job it is realy helpful

  8. [...] Visual Studio 2010 XAML Editor IntelliSense Presenter Extension – Very nice! [...]

  9. [...] Visual Studio 2010 XAML Editor IntelliSense Presenter Extension (Karl Shifflett) [...]

  10. [...] XAML Intellisense by Karl Shifflett – whoa! A fantastic find! Share Tools telerik, tim heuer, Tools Welcome and Re-Launch [...]

  11. [...] XAML Editor IntelliSense Presenter [...]

  12. [...] While not directly related to Windows Phone 7 development, these other recent links can come in real handy when developing for Windows Phone 7 Series: .toolbox – a cute site teaching basic design concepts Silverlight Training Course (Silverlight 4) Visual Studio 2010 XAML Editor IntelliSense Presenter Extension [...]

  13. [...] Studio 2010 XAML Editor IntelliSense Presenter Extension v2 I have updated the blog post and XAML Editor IntelliSense Presenter to [...]

  14. Visual Studio 2010 XAML Editor IntelliSense Presenter Extension « Karl On WPF…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

  15. [...] got full intelligence support which was patchy before (note above we’re using the awesome “Xaml Intellisense Presenter” plugin by Karl [...]

  16. olakarlsson001 says:

    Hi there,

    I tried this out and like it a lot.
    I ran into one issue however, with Resharper (ver 5 in my case), you can normally put your cursor on a event handler in XAML and hit F12, this takes you to the event handler declaration in the codebehind file.
    Installing this VS extesnion, breaks that behavior.

    Just thought I’d let you know.
    /Ola

    • Ola,

      Sorry you have a problem. I would contact Resharper tech support.

      This is a side effect of multiple vendor add-ins. It would be impossible for every vendor to test their code side-by-side with every other vendor’s add-ins; just impossible.

      My add-in does not listen for key strokes, in-fact it only runs when VS open an IntelliSense window.

      Please check with Resharper. What does the F12 key do? What command is it connected to?

      Cheers,

      Karl

  17. weitzhandler says:

    Great extension, couldn’t live without it!

    I would like to add that the filtering toolbar, would be better if it could look like the entire environment (blue etc.) and the extension should have the same size and feel guidelines as the IDE.
    Another note, when the intellisense contains no items, it shouldn’t appear at all (as for now, it shows its full size with no items).

    Thanks Karl!!

    • Thanks for posting your comments, really appreciate it.

      I thought about all these things when doing it. I don’t like the UI that changes size, I think this is a bad design, especially with a toolbar at the bottom.

      I wasn’t sure how to tap into the VS colors from the MEF object. Since developers can change their color scheme, you have to get the color from the settings, I didn’t know where these were stored. One other minor detail, the presenter must display instantly. If I had to look up colors, this might delay displaying the presenter.

      When I get time, I’ll post an article on how this works and the source code.

      Cheers,

      Karl

  18. [...] 9 shows an example of the new Intellisense feature in action (note that Karl Shifflet's excellent XAML Editor Intellisense Presenter Extension is being used here). The style intellisense feature was added into the product at the last minute [...]

  19. [...] a lot, and it was good … for while … until Karl Shifflett didn’t com out with XAML Editor IntelliSense Presenter. Here is a image, pasted from the [...]

  20. [...] you’ve grown accustomed to the new Pascal Casing and List filtering features in IntelliSense, the Visual Studio 2010 XAML Editor IntelliSense extension will give you these features plus more in the XAML [...]

  21. kcnz says:

    What are the chances of getting the source code? I am working on a project that is requiring tons of xaml binding where the drag and drop approach in vs doesn’t work well. Frankly I am not a drag and drop guy anyway. But it would save some time if I had some intellisense on my binding… I have done some plugins for coderush that work in c# files but they don’t seem to provide support for xaml intellisence.

    • My source won’t help you as it only displays what the xaml language service provides. (CompletionSets)

      What you want to do is VERY complex to do it correctly, example, parsing the XAML, taking into account d:DataContext and DataContext, sample data, d:DesignInstance, d:DesignSource, etc.

      If you want to try to do this in the XAML editor, contact the Blend/Cider team for some guidance on getting started.

      Cheers,

      Karl

  22. djscam says:

    Hey Karl, first off I must say this is a great addin! I couldn’t beleive they didn’t (and still have not yet) added features similar to you added… i feel lost trying to use the built in intellisense for xaml!

    I was wondering if the Font Size was hard coded or if it is pulling that size from a user setting, I use large screens with high Dpi (and are not as close to me as I would like…). I tried changing a few of the enviroment fonts with no luck, and reading your reply above to weitzhandler about the UI settings from the MEF object issue probably explains this.

    It’s not a big deal, just thought if you are planning an update, this would be a feature request if its not too much trouble (not sure where you would add it, maybe as a combobox in the toolbar? or a small popup window etc.) I have no issue with font family or colors, it’s just a bit hard to read on my setup.

    Thanks for the great tool though, huge improvement over the built in!
    -Cam

    • Cam,

      I think I hard coded it. I’ll add this feature request to my backlog and see what I can do. Should not be hard to implement. I’ll have to figure out the internal font resource for IntelliSense.

      Nice suggestion,

      Karl

Follow

Get every new post delivered to your Inbox.

Join 247 other followers