I'm using Visual Studio 2005 w/.NET 2.0. I have no idea what happened, but all of a sudden I noticed that the Properties window for ALL of the DataGridViews in my project went blank. I've tried dropping in new ones..still blank. I restarted Visual Studio and my computer...still blank. I've done some google searches, and I've found people who have had the same problem, but there is no solution and it appears that Microsoft has been unable to duplicate it. Any ideas?
I created a new project in a new instance of Visual Studio and dropped a DataGridView in there, and it worked..then I checked my other project in the other instance of VS and the Properties can back for my DataGridViews. Fluke or solution? No idea.
I have had similar problems where my property windows go blank. It tends to happen when your machine is using a lot of UI resources or your toolbox is trying to update its list of controls.
Check to see if your control is being selected by your property window at the top of the property window screen
Try switching to a different control and then back to force the property window to update
Just close your UI Designer and re open it.
If all else fails, just close and reopen your solution
If it's still a problem you can always reduce how much memory your toolbox/UI designer uses by removing custom control generation in your toolbox window. To do this go to Tools / Options / Windows Form Designer / AutoToolboxPopulate - set to false. Now this will not populate your toolbox with custom controls anymore from your solution.
This same thing happened to me because the full path of the project contained an '&'. When I moved the project to a path that did not have an '&' everything worked.
There was same problem - reason was '&'.
I had a bunch of similar problems with Visual Studio UI doing wacky things. I figured it had to do with memory consumption (not a lack of machine memory). Jetbrains made a wrapper here that has solved a lot of my problems in Visual Studio 2005.
Related
I followed this; Create a Windows Forms Toolbox Control from msdn, and was able to successfully create my own custom toolbox control and install it and use it. Perfect.
But, when I try to add another control file to it-for example in solution explorer I have ProjectName and then inside of that I have CustomToolboxControl1.cs(which works fine) and then I have CustomToolboxControl2.cs. CustomToolboxControl2.cs; for whatever reason does not appear in the toolbox, everything compiles fine with no compile or runtime errors, and I set it up exactly like I did the first one.
I've tried searching Google, YouTube, StackOverflow(Which I came across a few "solutions" that didn't work for me 'cause it was way outdated from like '08 and such), and can not for the life of me find out how to add multiple custom WinForms UserControls from one VSIX project. Not sure if I'm just not wording my searches correctly or not but...Here I am, makin' my first post here on StackOverflow. Hopefully I'm doin' this question thing right, it seems like a lot of SO posts I come across are people just getting anal in the comments about how the question was asked lol.
Here's some images that will hopefully further help:
The controls are CoffeeComboBox(the one that works) and CoffeeTabControl(the one not showing up in toolbox but compiles fine and is setup the same way as the other one):
Solution Explorer
And here's what it looks like in the debugging instance of Visual Studio Toolbox:
Visual Studio Debug Instance Toolbox
Nevermind, I solved it.
I did everything correctly, but the Visual Studio Instance was just buggy. I decided to close VS, try installing the VSIX project anyways, and then testing it on an actual new WinForm project rather than just a debug instance of VS. It showed up just fine in the toolbox there. Was able to drag both of my custom tools that were properly placed under the specified custom tab, from the toolbox to the form just fine.
For anyone else that may come across this question, to further elaborate;
If you follow this guide to Create a Windows Forms Toolbox Control from the msdn(Microsoft Documentation) site, just rinse and repeat for any additional UserControl WinForms Controls that you want to add. To do that; Right click the project name > Add > New Item... > Extensibility > Windows Forms Toolbox Control > giveItAName.cs > Click Add bottom right. Done.
Closed.
This is very strange. I have a custom UserControl called UIControl. That user control has another custom control (derived from Label control).
This worked OK for long time. Both at design time and at run time. However, now, I needed to edit that custom UIControl but the Visual Studio 2019 shows this error message:
This error means that the RealTime.DigitalClock is not found. As you see in the project, that control is not part of an external assembly, but the same assembly where UIControl is.
I have compiled and recompiled thousand of times and compilations finish perfectly. Even the application runs.
Furthermore, when I build the project, those user controls appear in tool box, but when I try to place it in any form, an error telling that the component could not be added and it will be removed from the tool box is shown.
I don't really know what is happening here. I have even closed and re-open VS 2019 but no avail.
Regards
Jaime
According to To prevent possible data loss in windows form c#, I suggest that you can do as the following steps.
First, Please find all the RealTime.DigitalClock related code in UIControl.designer and UIControl.cs.
Second, you can delete the above code.
Third, you need to rewrite the code you just deleted.
Finally, rebuild it and check if it works for you.
Just a few days ago this started happening, and I'm not entirely sure why. When I add a control to my form (specifically from here), it goes straight to the icon list, like where a timer would go.
Things I've tried:
Uninstalling and reinstalling Visual Studio
Installing another version of Visual Studio (tried 2010, 2012, 2013)
Adding the control's project to my solution and using it that way instead of manually adding the controls to my toolbox from the compiled dll.
Nothing has worked so far, so right now I am at a loss. Should I just reformat and start fresh?
EDIT: I should clarify. When it's added to the list at the bottom, I cannot manually add it to the form or anything. If I change the Location property, it goes straight back to 0,0 and doesn't show up.
MetroFramework.dll requires that you also reference MetroFramework.Design in order to obtain design-time support.
[Designer("MetroFramework.Design.Controls.Metro...")]
...
public class MetroButton : Button, IMetroControl
I've installed Visual Studio 2012 after reformatting my computer.
When I open a xaml file in a new empty wpf project, it opens it in a regular code editor and doesn't let me choose Design View (the option is just not there).
Right-clicking the xaml file and choosing "View Designer" opens a new code window instead of a new designer window. (yes, the same code window is actually opened twice)
Right-clicking the xaml file and choosing "Open With" shows that I'm missing the Xaml UI designer editor. (it doesn't show anywhere on the list)
I've tried running "devenv.exe /ResetSkipPkgs" and "devenv.exe /resetuserdata" and Repairing visual studio's installation all together (both by re-installing and the Repair button in the installation wizard).
Nothing seems to help.
Anyone familiar with the problem and knows how to fix?
Something else to try, I know a lot of folks disable the designer for performance reasons. This is done with a file extension association in visual studio. I'm wondering if the reverse may help you?
If you right click a XAML file in your solution and select Open with...
... You should see XAML UI designer as an option! select it and click 'Set as default'.
Hopefully that works for you.
I am just guessing, but my experience with VS2012 is, that sometimes it cannot access the registry, because it fails to set an owner for the newly created registry keys.
Without owner noone but the System can access those Keys.
I used resplendence Registrar Registry Editor Trial Version to Fix the broken Keys.
I would especially check
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0
and
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\XamlEditor
because you can find all the settings there.
In addition i experienced this error only on recently reformatted win 7 systems.
And all of them have ssd's, but i am not sure if it only occurs on systems where no "old" harddrive is. But i found some people on msdn who also experienced issues whith VS2012 and having only a ssd in the system.
This is absolutely ridiculous! Visual Studio is able to run (debug) my program just fine, but it won't display my layout in the designer. It just gives this useless error:
alt text http://img6.imageshack.us/img6/8661/vserrorscreenshot.png
Can anyone help explain this? I have not changed the XAML at all, not a single character, since the last time it worked fine. I've only changed some .cs code.
because VS is cripple in terms of Xaml editing. Just turn off that designer, http://www.thejoyofcode.com/Using_the_Source_Code_Editor_for_XAML_in_Visual_Studio.aspx
Have you tried doing a rebuild? In the past I have noticed that this happens if the compiled code is out of date.
See this: XAML Designer failing to render - UserInitiatedNavigationPermissio
Basically, that looks like bug that is fixed in Visual Studio 2008 SP1. If you already have SP1, then run repair installation of VS2008 (go to Add/Remove and then select Repair option)
Also see this StackOverflow questions:
wpf custom control not recognized
WPF Designer exception while trying to edit UI in Visual studio 2008
This sometimes happens when the application must use some data that is gathered at runtime to render properly. I've had this problem when my controls are bound to data in a web service.
Have you tried Expression Blend? It has a better design view, you can edit the cs code (though the Intellisense is limited) and you can run the debugger.
While it's not a full replacement (it's not meant to be) it does mean you don't have to continually swap between Blend and Visual Studio if you're just modifying the UI.