Show my own Methods/Properties of a MS .NET class always at top in Intellisense in Visual Studio 2010 - visual-studio-2010

I have a UserControl and I put some public Methods/Properties in there.
I would like to have that when the user of my UserControl types something and Intellisense opens, that he immediately sees my custom methods created in the UserControl, is that possible somehow by marking the methods/props with kind of attributes?

No, this is not something that can be easily done. Visual Studio will sort the methods/properties alphabetically.
To do what you want, you will need to:
Mark your methods/properties with a custom attribute
Write this custom attribute
Use VS automation to reflect over every type to find this attribute
Reorder the intellisense listing (not sure if this is even possible with VS VBA)

Related

How do I create a VS Extension without adding UI?

I'm writing a Visual Studio 2015 extension that adds messages to the Error List window. It needs no new UI. My code runs correctly if used in a tool window or menu item, but adding UI just for this feels like a sloppy workaround to obtain an IServiceProvider.
How can my code run and obtain an IServiceProvider without adding any UI elements?
Your Package class is an IServiceProvider; you can just call its GetService method.
If you're in a MEF class, you can instead simply import SVsServiceProvider.
For more information, see my blog.

How to display all class and its base classes members in Visual Studio?

How to display all class and its base classes members in Visual Studio while in the text editor? What I do is go into any method and type 'this.'. and look at what intellisense displays. Is there an easier way?
I use Resharper.
You can use the Hierarchies tool window, which will show the type hierarchy of the currently selected type. You can select each node in the hierarchy and display a preview, which will optionally consist of either the members defined at that point in the hierarchy, or all inherited members.

VS 2010 Class Designer not rendering relationships correctly

I'm using the Visual Studio 2010 Class Diagram designer and it does a nice job of showing relationships between a parent class and the classes that make up the properties of the parent. In the below sample, we can see that the IFoo interface has a property named Bar which is of type IBar.
However, if I add existing classes, interfaces, etc... that were created outside the designer it does not show the relationships. See sample below...
The code is all the same; and correct; but the representation on the design surface is different. For existing classes, is there a way to instruct the designer to make the correct links without having to manually recreate the items using the designer?
I wasn't able to find a way to do it for the whole diagram, but I did find a Property level context-menu item (e.g. Show as Association) which fixes it one Property at a time.

VS2010 extension for displaying type definition on hover

I used to have an extension which made it so that when you hover over a variable or a type in the code editor, a popup would show the type definition (similar to the class view and object explorer) as well as allowing you to navigate to derived types, base types, generic parameter types, etc.
Does anyone know which extension I'm talking about? Or know of a similar one? I've looked all over VS Gallery :(
Hi I think I have the same and I have only installed DPack and PowerTools from MS on my VS 2010 box.

What ListBox like control is used in Collections Editor of Visual Studio

I need to create a from which uses the same ListBox as the one from Collection Editor of Visual Studio (The ListBox under the Members label). Please, explain exactly which WinForms control is this and which of its properties are set?
You can see the control I am asking about under the Members: label of every collection editor form in design time of Visual Studio.
Thank you.
Hopefully this can get you started. There's other (probably better...) samples out there, but this is a basic starter which can help you get the concept:
http://msdn.microsoft.com/en-us/library/9zky1t4k%28VS.90%29.aspx
Quote:
This example shows how to create a
control named ContactCollectionEditor
that implements a custom collection
editor. The example shows how to
specify the exact type of the object
that a page developer can add to the
control's collection property when
using a custom collection editor. You
associate a collection editor with a
collection property (or the type of
the property) by applying the
EditorAttribute to the collection
property of the control.

Resources