What ListBox like control is used in Collections Editor of Visual Studio - 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.

Related

Snapshot for custom DevExpress grid

I have a custom DevExpress Grid overrided with custom GridView. How could I use table snapshots in TestComplete to support this control.
For custom TreeList I found the steps:
You can adjust TestComplete so that it handles a custom control in the same way as the corresponding “standard” control by using the Object Mapping feature. This feature sets a correspondence between control types and their possible class names. To specify that TestComplete should treat a specific control as one of the supported controls:
• Right-click your project in the Project Explorer panel and select Edit | Properties from the context menu. This will open the Project Properties Page.
• Select Object Mapping.
• In the list of control types, choose the type corresponding to your custom control.
• Press Add Class Name and enter the control’s class name.
-- or --
Click Add From Screen and capture the control using the subsequent Add New Object Class dialog.
The class names are case-insensitive and can contain wildcards (* and ?).
• Select File | Save from TestComplete’s main menu to save an object mapping template for the current project.
Note: TestComplete also provides scripting access to a number of child controls of supported third-party controls. Generally, you can work with a child control in the same way you work with its parent. For more information, see Working With Custom Child Controls.
You can not only add an object mapping template for a custom control in the current project, but for all new projects created with TestComplete. This is done in through the Object Mapping Options of the Default Project Properties dialog. In this case all new projects will already be “familiar” with the custom control.
and they work
Since you are working with a .NET Windows Forms applications that uses a grid based on the control from Developer Express, the base grid control is, most probably, XtraGrid. TestComplete has advanced support for this grid control (see the Working With Developer Express XtraGrid - Overview topic) and you can map your descendant grid to this supported control using the Object Mapping feature indeed.
To do this, you need to open the current project' properties editor (Tools | Current Project Properties), select the Object Mapping options group and find a record for the base XtraGrid control as the Developer Express Controls | XtraGrid item. Add the full name of your custom grid's class to the list. This name is stored in the ClrFullClassName property of the grid object. You can see this property in the Object Browser panel.

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.

Custom controls in Visual Studio Lightswitch

Can someone point me to an article or tutorial on using custom controls in Visual Studio Lightswitch? I'm trying to add a rich text box to a page, linked to a string property. When running the app, sometimes the field will show up, sometimes it won't. If it does show the width of the field is small, about 2 characters, but will expand when text is pasted inside. Saving doesn't work, though.
I'm not even sure about whether or not I'm allowed to use controls like these in a Lightswitch app, even though custom controls are obviously supported. Are the custom controls restricted to a certain type or set?
Thanks in advance for any assistance.
W.
Have a look at the following example, http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/10/LightSwitch-Student-Information-System-Part-3-Custom-Controls.aspx
Also the Training Kit has examples of Custome Controls included.
There is also this tutorial:
Creating A LightSwitch Custom Silverlight Control
http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2/Creating-A-LightSwitch-Custom-Silverlight-Control.aspx

custom controls with sub components ownership

I have a Visual Studio designer enabled control which uses a collection editor to allow the user to create and edit sub components.
For example, I have a control which offers a readonly "List" property containing a collection of bindings (themselves components with a name property and an event). The user can modify this list of bindings at will and everything works pretty well. They can create and remove bindings without a glitch.
However, when they copy the control, the designer does not copy the binding, it still refers to the original binding components. Also, when they delete the control, it doesn't delete the bindings. It is as if the form has the ownership of these bindings, not the control.
I'm sure there is an attribute to use or some interface to implement, maybe even a custom editor trick to use, but googling for it has left me "feeling unlucky".
Thanks for any help you may have! :)

Viewing a list of Controls associated with a class in Visual Studio IDE

I'm using the form designer in VS.
I placed a label on my form, and then deleted it's text.
Currently, I can not locate the label.
How do I see a list of controls associated with a given class?
View --> Other Windows --> Document Outline
If you look in the properties window there should be a dropdown of all the controls on the form. You can select a control you can see and then you should see that control in the dropdown list. Then open the list and find the control you are looking for.
In your launched Visual Studio IDE open:
I - Solution Explorer with CTRL+ALT+L,
II - Document Outline with CTRL+ALT+T.
III - Open any class from the Solution Explorer to see the Document Outline populate accordingly.

Resources