visual-studio-designer

Form with a MainMenu shrinks every time the project is run

心已入冬 提交于 2019-12-07 22:05:50
问题 Whenever I build the following program Form1 's size shrinks by 20. (In some cases I need to make a change to the form, such as moving someLaggyControl1 by a few pixels, but not always. It's weird.) The form uses a MainMenu for the menu, not a MenuStrip. Yes, MainMenu is older and not recommended for use, but I need to use it for several reasons, one of which being radio-button items. Changing to a MenuStrip isn't a valid solution for me. Here's the code needed to reproduce this issue: Form1

How to open code on double cick on form by default?

谁说胖子不能爱 提交于 2019-12-06 16:49:31
问题 Is there an extension for Visual Studio 2010 for opening code for forms, components etc. in WinForms application projects on double click in solution explorer by default (and in designer view via context menu)? 回答1: item -> right click -> Open With -> Source Code (Text) Editor -> press Set as Default button 回答2: you can set visual studio's default editor to be the code view rather than the form view. Just right-click and choose Open With... then you can set the default in there. 回答3: You can

How to open code on double cick on form by default?

蹲街弑〆低调 提交于 2019-12-04 22:22:41
Is there an extension for Visual Studio 2010 for opening code for forms, components etc. in WinForms application projects on double click in solution explorer by default (and in designer view via context menu)? item -> right click -> Open With -> Source Code (Text) Editor -> press Set as Default button you can set visual studio's default editor to be the code view rather than the form view. Just right-click and choose Open With... then you can set the default in there. You can press F7 to toggle between designer and code. Not sure about double click, but if you select the file in Project

System.NullReferenceException occurs in xaml designer

六月ゝ 毕业季﹏ 提交于 2019-12-01 15:48:27
I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this? That's very odd but I solved following these steps: Close any instance of Visual Studio Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter) Run the "useless" created project then close it as Visual Studio Open again your previous C++ UWP project In my case everything started working! Switching solution platform to x86 worked for me. I'm

System.NullReferenceException occurs in xaml designer

杀马特。学长 韩版系。学妹 提交于 2019-12-01 14:58:51
问题 I've created a C++ UWP Windows 10 app using Visual Studio 2015. However, I'm not able to visualize any xaml in the designer because I'm always getting a System.NullReferenceException error. How can I fix this? 回答1: That's very odd but I solved following these steps: Close any instance of Visual Studio Open Visual studio and create a new C# UWP empty project (name it as you like, do not matter) Run the "useless" created project then close it as Visual Studio Open again your previous C++ UWP

Could not find type 'xxx.xxx.xxx'. Please make sure that the assembly

耗尽温柔 提交于 2019-11-28 05:16:25
I've searched StackOverflow and found similar problems when I try and open a form that references a UserControl in a different project. I get the "To prevent possible data loss before loading the designer, the following errors must be resolved:" message relating to the following two errors: Could not find type 'MyNamespace.CommonUi.InformationBox'. Please make sure that the assembly that contains this type is referenced. If this type is a part of your development project, make sure that the project has been successfully built using settings for your current platform or Any CPU. AND The

Issue with shared WinForms resources across projects in Visual Studio

风流意气都作罢 提交于 2019-11-27 18:37:45
I've moved all image resources in a large multi-project solution to a new project specifically created for shared resources. Adding a new reference to other projects where the shared images are used is working as expected. The image in the selected button below continues to appear in designer but with issues. In VS Designer, I'm unable to select shared resources in the Image Editor, having instead to manually edit the designer code. More specifically, in the Image Editor dialog (accessed from the 'Image' property of an existing control) I select 'Select from File/Resource..." to pop up the

Issue with shared WinForms resources across projects in Visual Studio

↘锁芯ラ 提交于 2019-11-26 22:42:26
问题 I've moved all image resources in a large multi-project solution to a new project specifically created for shared resources. Adding a new reference to other projects where the shared images are used is working as expected. The image in the selected button below continues to appear in designer but with issues. In VS Designer, I'm unable to select shared resources in the Image Editor, having instead to manually edit the designer code. More specifically, in the Image Editor dialog (accessed from