Winforms control (ObjectListview) shows up as componenten in form tray instead of visual control on canvas - visual-studio

I have made several controls over the past time through Folder > Add > User Control, then dragging an ObjectListview onto the designer and setting anchor/ dock etc then implementing the code.
Since this morning when drag an Objectlistview onto a control, it shows up as a component in the bottom tray instead of on the control's design canvas.
I can't remember installing any updates on either visual studio or the ObjectListview NuGet package, it's still 2.9.5 from 2017. The behaviour is the same in Visual Studio 2017 and 2019 preview..
I did install .Net Core SDK 2.2.402 ealier this week but this project references Framework 4.6.1..
When I add a standard TreeView or ListView etc onto the form they get added normally.
I'm comparing the code with other controls I created this way, both derive from UserControl. The control that works as normal has the line near the end of InitializeComponent()
this.Controls.Add(this.objectListView1);
For some reason for new controls I create that line isn't generated by the designer for ObjectListview.
If I manually add that line to InitializeComponent() the control does show up on the design canvas but I can't select it or do anything with it.
Does anyone have any idea what could cause this changed behaviour and how to fix this? I'm working sundays b/c I'm very busy this is really messing me up.

I was able to fix by uninstalling and reinstalling the nuget package.

Related

Visual Studio WinForms Designer: Unable to Move Controls inside of TabPage

I am using a .net core 3.1 WinForms Application.
Moving controls works perfectly fine outside of a tab control, but the moment I place a control inside of a TabPage I am unable to move it again. I can no longer select it from the designer either, and the only way I can is to select it from the properties menu.
After I access it from there, the only thing I can do is resize it, as shown in the image below:
Things I tried:
Made sure the component was not locked.
Pressed escape (as per the solution here)
Rebuilt the solution.
Restarted Visual Studio.
Deleted Visual Studio's AppData folder.
Made sure my Dock property was set to none.
Ensured Visual Studio is on my primary monitor
I really want to use tab pages with my application, but I don't want to keep resizing it everytime I want to move something, so any help is greatly appreciated.
Update: I decided to switch my project from .Net Core to .Net Framework and it now works, so it must have something to do with .Net Core. I'll leave this open if anyone has a solution for .Net Core.

Using xamarin android designer in visual studio doesn't change layout

I'm using the android designer in visual studio 2010, and I can put things on the layout without a problem. when i click to change the view from '4in WVGA (Nexus S)' to anything else, the background 'bounding box' changes size, but the content does not resize.
This happens even if I just create a brand new layout and don't put anything onto it.
Also, when I try to apply different themes, nothing changes. Anything I'm doing wrong, or is it a bug?
Found out that this is a known bug. MonoDevelop works fine. I assume they're working on it.

Extension toolbar position not saved in Visual Studio 2010

I am using db4o in Visual Studio 2010 but the Object Manager Enterprise toolbar will not saved its position when I restart the IDE. It comes back each time below the standard toolbar while I would like both toolbars to be on the same row to not use vertical space.
Do you have the same issue with this extension or another extension? How can we force a toolbar to remain at the same position accross sessions?
As an alternative, I wanted to create my own toolbar with the same buttons (as a toolbar I create would not be affected by the issue), but I cannot find the buttons related to the extension in the long list of available commands.
Thanks!

Controls do not show up when dragging from toolbox

When I drag controls from the toolbox to an .aspx page or the designer for that page nothing shows up. I am using Visual Studio 2010 with an existing website project.
** Update
It seems to work now... I'm not sure if this was specific to one project, or a combination of things.
Is the project under source control or in a read only state?
I think the project is so messed up it just doesn't work. If I start a new project it works, so I'm going to leave it at that

Visual Studio do not add my component (from a DLL) to the toolbox even if I reference it

As stated in the title, I copied my DLL in Visual Studio project, set it to "content" and "copy always". Added a reference to this DLL and set it to "copy locally".
I successfully managed to instance my component to a form through code but it doesn't appear in the toolbox, really boring.
How can I solve this issue?
If I link directly the DLL project to this project it works, but now I'm treating the DLL as "external" so it's not part of the same solution of the DLL project.
I had this problem with #AndrewFinnell's solution:
There are no components in 'c:....\XXXX.dll' that can be placed on the toolbox.
So I solved with drag and drop:
open Windows explorer and navigate to the DLL
drag the DLL and drop it on Visual Studio in the Toolbox, exactly where you want your components to appear.
I also realized that some components may have compatibility issues with certain .NET Framework versions. For instance A Professional Calendar/Agenda View That You Will Use seems not to work with .NET 4.5, while it does with .NET 4.
Right-click in the toolbox.
Click "Choose Items..."
Click "Browse..."
Navigate to your DLL and click Open
Then click "Ok"
Your components should then show up
The way I found to make this working is:
Add the dll, reference it
Compile the project
Save the solution and restart visual studio
And then controls show up in toolbox (not always working, I think is a sort of visual studio bug)
Like said above,
I reference the DLL in the client project by: in Solution Explorer right click > Add Reference, at this time the custom control doesn't appear in the Toolbox.
I save it and close the client project.
I restart Visual Studio 2012 and reopen the client project. Now the custom control is in the Toolbox.
I reopen the custom control project, make some modifications and compile.
And the most important, all changes that I made in the DLL project automatically were updated in the client project without need to redo "Add Reference".
Here is what I did.
After install the net 3.5 chart download from MSDN link, I manually copied the 3.5 chart dlls to my project and refer to them. Then, from the "choose item" of toolbox, browse to the dlls and add them into toolbox. Make sure the checkbox is checked for the "chart" in the "choose item" popup.
After these, the "chart" item in the toolbox should be available and enabled for .NET 3.5 project.
NOTE
(I am using Visual Studio 2010. I think my solution should work for 2012.)
I was having this same issue. I am working in Visual Studio 2010.
My user control library is written in C# and my project I'am importing it into is in Visual Basic.
If I had the C# project in my solution, the custom user controls would show up automatically. But if I only referenced the DLL it would not load the custom user controls from the referenced library into the "Toolbox".
The above post that mentions finding the file in explorer and dragging and dropping it into the toolbox solved the problem. This is a very strange way of behaving. VB user control libraries don't require this step.
This has been an issue I have had sitting on the burner for the last 2 years.
I would up-vote the previous answer but I don't have enough rep yet.
This post could use some better tags, cause it was buried on most of my google searches.
So
Reference the user control library
Drop the DLL file into the tool box.
One question I have in regards to this is: what happens if you change the project reference to the DLL (because it moved) and not attempt to update the toolbox reference (by removing the control from the toolbox and dragging and dropping the DLL from the new location)?
I tried following the other answers (thanks to all of you!), but I got this problem and I'll let you all know how I solved it and show my custom tools in toolbar (in VS 2017).
Place the .ddl file in any Library Solution
Then I add that .ddl as reference to my needed project
Build the project and restart the Visual Studio
Then, when I look into toolbox, my custom toolbox name appears in
toolbar, when I expand that I got below message
There are no Usable controls in this group. Drag an item onto this
text to add in to toolbok
I dragged the .dll and dropped under that text and then all my custom tools appeared in my toolbox.
And add lib. to folder in your solution example solutionfolder/bin/debug and then add reference to object from this folder, finally rebuild, quit, come back, drag and drop dll from this solutionfolder/.../../ and it will probably appear.

Resources