What's wrong with the VS.net ASP.net designer - c#

I've seen this happen in both VS.net 2012 and VS.net 2015.
Whenever I use a tabcontainer within a web form and put several tabs in it without a width setting, within the VS ide, the designer the screen looks like this:
But if I put a width in the tabcontainer, say 500px, it looks fine.
Now when I run it without the width, the web page looks fine.
I know I should probably just ignore the designer screen but it comes in very handy at design time. Hence why I'm sure they called it "Designer"
Is there a setting I'm missing in VS that will allow the designer to work correctly? Or some code I can put into it?
John

Related

How do I Fix designer when components are not showing?

Yesterday I updated windows 10. Today when I opened visual studio it seems like .cs[design] is not working properly. All the components I used is aligned with same size and same margin.
I've tried to roll back some updates, except for those updates that required specific files('__vs' some thing like this).
I didn't change designer.cs or resx file.
Thanks in advance.

MDI Child Form is scaling to the wrong size

I have an old C# winforms project I have support for several years now. In this project there is a main form that is an mdiparent and each other form is a child that fits inside the blank area of the parent. This has never been a problem.
Now I am trying to make modifications to this app again, but I do have a newer version of Visual Studio (2015) than I used to. So there is only ONE child form in this app that is giving me trouble. If I revert all my code, open the project, build, that form will appear/scale correctly. If I revert all my code, open the project, open the UI of the form, build, it will shrink the child to a smaller area inside the parent. It only happens on this ONE form, the rest work fine.
I have tried messing with all forms of autosizing, scaling, window size settings, etc but I think its something in VS that is causing just that one form to auto scale incorrectly and I'm not sure what it is. If I look at the auto generated code and compare it to the other forms it will set AutoScaleBaseSize to (6,15) but other forms are at (5,13). If I do like I mentioned above and revert the code but do NOT open the form, the autogenerated code for that form is (5,13) like the other forms.
What is happening in Visual Studio to change this AutoScaleBaseSize property and how can I find the culprit?

visual studio C# Mysterious change to winform look and feel

I have been creating a simple report application using winforms and crystal in Visual Studio 2010. All was good until one day I opened it up, gave it a run and the entire look and feel changed to the classic windows style. I can't figure out what the heck I did to change this. I have been looking through every setting and property I can find and have not been able find anything. In the picture provided, the top window is what it looks like in my designer, and what it looked like before the change. The bottom picture shows what it looks like now when running.
Any ideas?
It looks like you removed this line:
Application.EnableVisualStyles();
from your Programs.cs file in the Main() method. That's the only way I was able to get that classic look.

testrun of form in visual studio c# shows a visible small scale version of it

i recently installed visual studio 2015 and made my first code in c#.
('maximized' for window state at the properties of the form)
everything went fine (comilation and testrun without errors) until i attempted to load one of the example tutorials, which i interrupted during loading.
after that i compiled and started my self coded application again from within visual studio. this time the output of the form was, unlike before, displayed half its size.
all the buttons including the window of the form appeared half its original size.
but when i executed the comiled application outside of visual studio (without it actually running) the application started in normal scale as intended.
this effect happens for this specific project only. if i start a new project the compilation & testrun will show a form scale as expected.
so my question: is there any magical setting that i have to change to end this nightmare ? i dont like to start all over again with a new project. i had set up 72 different button already. each buttonpress causes a different
SendKeys.Send("");
to be executed.
Check the Form's AutoScaleMode property!
The default is Font:
Controls scale relative to the dimensions of the font the classes are
using, which is typically the system font.
If that won't help do try to create a new project and copy the relevant cs-files into it!
In theory there is a zoom option in the VS designer, but at least in the Winforms desiner the shortcut does nothing for me.. It probably is for the WPF designer.
You did tag the question correctly and it is indeed about Winforms?

[File].Designer.cs corrupting self - Designer hell

I have a winforms application that I am writing in C# - in Visual Studio 2010. I have one specific form that keeps corrupting itself every other day or so - according to TFS, it looks like most of the file is re-written by the designer when I have made only the smallest changes. (location of buttions, etc.) Things fall off strips, toolbars, etc. as well as errors just trying to use the designer. See my other post Here. (Thought I figured this out, but I guess not)
Here is an example piece of code that goes missing - when I put it back in, it takes it back out when I save the file. The code was generated by the designer in a previous file version.
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tssEmployeeName,
this.tssLoadTime,
this.tssSpring,
this.tssHomeLocation,
this.tssTotal,
this.tssDue});
Is there any way of 're-generating' the [file].Designer.cs file? Or should I bite the bullet and re-do this form? (pain with over 100 components on this one...) It's the only form I have a problem with out of the 35 or so in the project.
VS 2010 w\ SP1.
Thanks, Andrew
I've experienced this before, although I'm not sure if my issues were exactly the same.
Try putting a handful of problem controls, such as your StatusStrip control and its children, into separate User Controls. Then add those User Controls to the main form instead. At the very least, you can prevent the designer from rewriting those controls.

Categories

Resources