VS2008 Resize text editor macro - visual-studio

I'm using Visual Studio 2008 and I split my text editor into two vertical text editors. I thought it would be useful to have a macro that re-size the active text editor to take up most of the screen but I haven't gotten very far. I get an error whenever I try to change the width oh a text editor.
DTE.ActiveWindow.Width = 800
And I'm not sure how to identify weather the active window is a text editor or not.
Anyone know what I'm doing wrong?
thanks

Check the Kind property. Should be "Document" for text editors, I suppose:
If DTE.ActiveWindow.Kind = "Document" Then
' ActiveWindow is a text editor '
End If

Related

How to get Visual Studio editor text with color formatting?

I have a VS plug-in that currently takes the editor text by getting a TextDocument via app.ActiveDocument.Object() and then I get the text from that. This, however, is just plain text, and I'd like to have not just text but the color information (kind of like the RTF export). How can I get it?
Cast EnvDTE.TextDocument.Selection to EnvDTE.TextSelection and then use EnvDTE.TextSelection.Move(point1, false) and EnvDTE.TextSelection.Move(point2, true) and then EnvDTE.TextSelection.Copy() to copy to the clipboard, which you should preserve saving its content before copying and then restoring when done.

What's the name of the bar below the Property grid in VS?

I'm using the Visual Studio Color Theme Editor extension to help darken up VS2010, found a nice theme that I like however I've got one big problem with it.
On the Property sheet, at the bottom where it says the name of the property and a sort description this theme I'm using is impossible to read; Black on a dark grey background. Unfortunately, I don't know what this specific segment of the Property window is called to change it.
You can not change the text color with the extension.
To figure that out, copy FFFFFF, select all line in the theme editor configuration pane (with Shift), press Ctrl+V (yes, you can do that, pretty neat !) and hit apply : everything that can be themed will then appear white. The text however, will stay black.
You can hopefully change the background color : It's called ToolWindowBackground. It will affect all tool windows of course. There's no specific item for this window in particular.

How to change font size in existing visual studio class diagram?

I want to make text smaller, not zoom diagram but change font size.
Is it possible?
I've found a solution:
Open *.cd file with text editor.
Find string in the end of file like this:
<Font Name="Consolas" Size="7" />
Change it.
You can change this by setting font size and more in the options menu of VS:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/566e3e74-5955-431f-bc58-f92f68effa39/changing-font-size-in-class-diagram-vs2012
Reopen your diagram and everything will be adjusted.

What's the vs.net 2010 color item name for highlighted text when searching?

Whenever I do a find/replace in vs.net 2010, I can barely see where the highlighted text is on y screen.
I want to change the background color of the highlighted text during find/replace etc.
In vs.net settings (font and colors), what is the item name that is for the highlighted text during find/replace?
Within Visual Studio 2010
menu: Tools->Options->Environment->Fonts and Colors
in the Selected Items window: choose "Selected Text" (it's the second from the top for me.)
You can then change the background color (on the right side of the dialog window.)
The correct item is inactive selected text.
See Dave's answer here:
visual studio find and replace highlight color
You have to install the Productivity Power Tools extension to change this setting. Then it will be under Find Highlight (Extension).
For me, the selected text setting does not affect the color of highlighting when doing a find/replace or a quick find.
You'll find that one at: Text Editor -> Selected Text. You're looking to set the Item Background property. Be aware, it's the same format used for any time text is selected, not just when find/replace is invoked -- that specific action doesn't have a specific format associated with it.

VS 2010 - find text in XAML editor

In VS 2010, when searching for text in the XAML editor, the highlighted text is highlighted in the lightest gray colour when not in focus. Is it possible to change the background colour of the highlighted found item text? I've tried changing the VS theme but cannot find the property which would set this colour. In the screenshot below, the text "Text" is selected but you can barely see it and its driving me mad.
It's a bug that it doesn't show up as the active selection color when you perform a Find. I didn't find a workaround for it until after VS2010 shipped, sorry :( I'll find the Connect bug for you to vote up and then update this answer.
WORKAROUND:
After clicking CTRL + F, then click on the scroll bar in the XAML to regain focus on the XAML and you'll see the find text in the correct colour!

Resources