vs2010 designer duplicate control from base class - winforms

Folks,
I have form(formA) that derived from another form(formB)(that derived from DevExpress.XtraEditors.XtraUserControl).
In base form i have control - public DevExpress.XtraBars.BarManager barManager;
When i open inherited form in vs2010 designer this control(barManager) gets duplicated in derived form.
I use vs2010 ultimate SP1. My colleagues do the same - but control didn't duplicated they use VS2010 SP1 too. May be it's settings of vs2010 ? How to fix it ?
Thanks,
Dzmitry

As I remember, there in DevExp settings is a setting that enable/disable edit of DevExp control`s child controls. Maybe it is the reason.

Installation of DevExpress fixed this problem(first time i've just added some assemblies to GAC).

Related

Missing Toolbox Items in VS 2013

I'm developing a WinForms application using Visual studio 2013. I have two user controls and 1 custom control in my project. Unfortunately for some reason they are not appearing in my toolbox at design. At one point they did briefly but disappeared and never returned. I have tried resetting the toolbox, checking the AutoPopulate option and made sure that my project is built. I've seen solutions about adding controls that exist in their own library but these exist within the same project. My classes also have a namespace and the ToolboxItem(True) attribute.
Thanks

Unable to drag and drop telerik components on windows forms

I am trying to drag and drop Telerik RadGridView on my windows form. But instead of showing on the form(in designer view), it shows the control just below the designer i.e. the area where some of the controls like DataSet, Binding Source, FileDialog controls are shown when added to the form from the toolbox.
The same problem happens for any rad control like RadButton, RadLabel etc. I can work on the control by using the controls added to the form, but the problem is that in case of some controls like RadGridView, the smart tag is not available that makes a lot of things easier.
I think I am missing something, so that I am unable to drag-drop the controls. Can any one help me out?
Can also be caused by a version mismatch. I had the latest version installed but code base referenced previous version (specifically 2011 Q2).
An uninstall of latest and install of 20011.Q2 fixed it for me.
This is caused by missing design time assembly in your GAC. Uninstall the all telerik controls from your computer, reinstall them and then update your project references. This should solve the problem.
More info at this link.
you must ReInstall your telerik product then open your project and reload your toolbox.
this sometime happen like you update your visual studio or you install a new package of telerik.

How can I make a WPF custom control automatically appear in the Visual studio toolbox?

If I create a WPF user control, it appears automatically in the Visual Studio toolbox.
Is there a way to make other controls appear automatically in the Visual Studio toolbox?
Conversely, is there a way to hide a user control from the toolbox?
You can right click on the toolbox and select Choose Items... Then from there you will get a dialog that allows you to select which controls to show or hide.
Per comment below if you are trying to figure out how to do this for a Third Party that you are providing your control to check out this MSDN article that describes packaging your control:
http://msdn.microsoft.com/en-us/library/ms165358.aspx
Auto population is described here (at the end), but to summarize you can add DesignTimeVisible(false) to your UserControl to prevent it from being added to the Toolbox.
Your controls should be added just like your UserControls, assuming they meet the requirements at the end of the link above, which are:
To appear in the Auto-Population
Toolbox process a type must derive
from FrameworkElement and:
Are public and have a default public or internal constructor or are
internal and have either a default
public or internal constructor
Types deriving from Window or Page are ignored
FrameworkElements in other .exe projects are ignore
Internal classes will only be displayed when the active designer is
for an item in the same project
Friend Assemblies are not taken into account for Toolbox
Auto-Population
If you are building reusable controls (where your end-users will simply add a reference to your assembly), then you'd need to tell Visual Studio that it should load your controls into the Toolbox. There is a tutorial for WinForms controls on doing this here, but the concepts are the same. A VSIX installer tutorial can be found here.
A lot of the resources out there are for older versions of Visual Studio, but again the same concepts should apply. You simply need to update version information where appropriate.

WPF Creation versus Visual Studio Creation

I created a form in WPF and it looked great. When I opened it in Visual Studio 2010, it look alot different than what I created.
Any ideas why this would happen? Should I ignore how it shows up in VS? This makes me wonder if either is how the user will actually see it.
Any suggestions?
Thanks again!
Eroc
The Visual Studio view of your WPF form is the designer view. Designer views of WPF forms, or really any other design of a UI component, will often differ in dislpay vs. the actual running component. Some of these differences are intentional to make design easier and some are just limitations of not having the WPF element actually running in a program (lack of certain runtime data bindings for example).
I wouldn't worry about it unless it starts looking incorrect when running.

Stop silverlight or wpf usercontrols from loading in the toolbox?

I have a project with 100's of usercontrols. When I load the project in VS2010 and try to open a designer, the toolbox spins and spins until they're all loaded.
Winforms has a "AutoToolboxPopulate" switch under Tools/Options/Winddows Forms Designer/General.
I cannot find a similar switch for the XAML designer. Does one exist?
In VS2010, the Auto Populate Toolbox switch for XAML can be found under Tools/Options/Text Editor/XAML/Miscellaneous.
If you wish to keep the Auto Populate enabled, you can decorate your usercontrol classes with the System.ComponentModel.DesignTimeVisibleAttribute which will allow you to specify if they appear or not in the designer.
Unfortunately there isn't one that I am aware of, with the exception of actually adding a design-time (*.Design.dll) assembly for the project that effectively defines metadata to hide the explicit controls.
This bit me as well recently and I wish I had a solution like the old winforms attribute!

Resources