I want to see only the event开发者_开发百科s for a given object. But when I use IntelliSense shows all members.
One of the features of a Visual Studio addin, called Visual Assist X, is the enhanced IntelliSense, which allows you to filter by events, properties, methods, etc:
It's not exactly what you asked, but it's pretty close.
I think it's not possible out of the box for c# code, see msdn and stackoverflow. For some obscure reason filtering does work in the xaml Editor.
With Resharper you have the filter functionality though.
In Visual Studio 2017 check this option:
Tools -> Options -> Text Editor -> C# -> IntelliSense -> Show completion item filters.
You may use icons or shortcut keys to filter particular categories. Unfortunately, I found this option only in C# and Basic. I expect it in XAML.
IIRC, ReSharper supports this.
The new version of Visual Studio (Today it's named "Visual Studio 15 Preview 3", it should be renamed as VS 2016 or VS 2017 later...) natively support this feature. It was presented in Build 2016, take a look at this video of the presentation in the exactly time that they talked about it: https://www.youtube.com/watch?v=RNpFHbEaNpU#t=2644
The latest version of visual studio has buttons in intellisense widnow, to filter based on property, event or method. Please see the screenshot below:
精彩评论