possible to default-disable XAML designer in VS 2008? - visual-studio

A lot of my XAML pages were designed by hand and don't need to be shown in the designer when I open them-- I'd prefer just the XAML page. The designer is getting in the way most times.
Is it possible to have the designer disabled by default, with the "resume loading the designer" link available in case I change my mind?

Tools
->Options
->Text Editor
->XAML
->Miscellaneous
-> tick: Always open documents in full XAML view.
or you can just Double-Click the XAML tab.

Right click and select "Open With..." and then choose the XML editor and select "Set As Default".
Now it will always open in the editor view by default, and you can still toggle the views if you need to.

Related

uncomment and comment button in visual studio 2017

How can I show these buttons please? They are usually there in C# but not in R. I can use of course CTRL+E, U and CTRL+E, C. Thanks!
They are in the Text Editor toolbar.
View --> Toolbars --> Text Editor
Open Tools menu, select Customize. In the dialog that opens, select the Commands tab. Select Toolbar radio button and in the dropdown next to it select the toolbar you wish to add the buttons to. Or go to the Toolbars tab and create a new one, select it, then back to Commands tab and select the new toolbar.
Click on Add Command..., select the Edit category and then scroll through the long list of commands until you find "Selection Comment" and Selection Uncomment" and add them to your toolbar.
My new installs or updated versions of VS sometimes seems to not remember my personal preferences, so I've had this same question, as well. The default key commands work, but sometimes the new VS does not show the toolbars that include the comment/uncomment buttons for all the file types in which I want them to show.
To add the buttons, open a file you are not seeing the tabs for, click View => Toolbars, and make sure Text Editor is selected.
Or, right-click on some open tab space at the top of your VS screen, and click "Customize". The resulting window should show plenty of Toolbars in the Toolbars tab. Make sure the "Text Editor" is selected - that's where the comment/uncomment buttons reside.
This should be the case for Visual Studio 2015-2017
For those who are looking for comment and uncomment buttons in visual studio 2019, I am posting here...
You can do it in two ways
Right click on any free space in the Visual Studio toolbar, then select “Text Editor”. comment and uncomment buttons will appear.
Go to view -> toolsbar -> texteditor then you can see comment and uncomment buttons.

Add TabPages to Tab Control in Visual Studio 2010 Designer

I'm using Visual Studio 2010 Professional, and created a WTL Project (Dialog). In this dialog, I inserted a Tab Control via the Toolbox. However, after placing it on the dialog window in the Designer/Resource Editor, I just can't add any tabs. There are several issues:
In some video tutorials and the MSDN, it says that the Tab Control starts with two tabs, which switch when clicked. However, the Designer shows five tabs, which don't switch when I click them.
Aforementioned tutorials also suggest to edit the TabPages property in the property pane. However, I can't find such a property in the property pane.
When running the Test Dialog (found in the Format menu), the five tabs are visible, and they are also focused/switched when clicked. However, running the program, there's only the plain Tab Control pane without any tabs (white square).
How can I add a Tab into the Tab Control via the Designer, i.e. not dynamical?
Let's be good stackoverflowers and answer the question properly.
The visual basic tutorials do not show the same dialog resource editor you are using for your WTL project. Although, the video tutorial that is most closely related shows how to add a tab control using this editor; it does so by altering the MFC code. It runs the program to show the result; it does not show the tab inside the resource editor.
Thus, the conclusion is that tabs cannot be added using the dialog editor on its own.

How do I edit the Menu on a VB6 form from the IDE?

I have a small application which contains a form with a menu along the top. I wish to make changes to the menu, but can't seem to do so from within the VB IDE. Every time I click on it to select it, the code for the item clicked is displayed.
Does anyone know how to edit the menu bar from within the IDE?
(I could edit the .frm file to make the necessary changes but I am reluctant to do this if a "proper" way exists.)
You can edit a VB6 menu in the IDE by bringing up the Menu Editor by selecting Tools > Menu Editor or by pressing Ctrl+E.
You can find fairly complete instructions here and here.
Right click the form and select the Menu Editor option.
Tools -> Menu Editor from the IDE menu bar.
The option should also be available on the Standard toolbar and the form context menu.
This modal dialog is only available when the form designer has focus.

Customize project context menu of visual studio

I'm using Visual Studio 2010 with some add-ins and extensions. The problem is now that the context menu of the project items in the solution explorer is getting so large that I always have to scroll down for the "Properties" and the "Open in Windows Explorer" which I use most.
This is getting very nasty.
Is there a possibility to group commands into a sub menu or to modify the position of the commands in the context menu?
Yes, it can be edited.
Go to 'Tools' -> 'Customize...' -> and select the 'Command' tab.
Select Context Menu and pick Project and Solution Context Menus | Project
You can always use the keyboard to do the work for you.
The default binding for Properties is Alt+Enter (or sometimes F4 depending on what add-ins you have installed). Select the project in Solution Explorer and hit Alt+Enter to show it's properties. (This works for almost any other object as well, btw).
The default binding for view SolutionExplorer is Ctrl+Alt+L, so you don't have to use your mouse to get there.
There is no default binding for opening a project in Windows Explorer, but you can set one yourself.
The keyboard bindings are set under Tools->Options...->Environment->Keyboard, and the interesting settings in this case are probably View.SolutionExplorer, Project.OpenFolderinWindowsExplorer and View.PropertiesWindow or Project.Properties depending on which propertiy collection you were referring to.

VS 2008 Windows Forms make "View Code" the default for UserControls

We have some UserControls that can not be designed. So the Windows Forms Designer in VS 2008 is pretty much useless and it takes some time until the designer throws the exception when accidentally doubleclicking the UserControl in the solution explorer. Is there a way I can make the designer open the C# code view when doubleclicking on a UserControl file?
I set up all of my forms to open in code view by default by right clicking on one, and selecting the "Open With..." option. From the dialog that appears, select the "CSharp Editor" option and click the "Set as Default" button, then "OK".
You can do the same with user controls, and other types too.
If you want to control this on a file by file basis, add the following attribute to your controls that you want to open in the source code editor:
[System.ComponentModel.DesignerCategory("")]
public class MyControl : Control
{
}

Resources