Expression Blend reload file shortcut - expression-blend

Is there any way to reload a file open in expression blend, from using a keyboard shortcut or any other shortcut? Currently, while in expression blend, I just close it from the "x" button, and then re-open it, but its tedious. Is there any other alternative?
I find myself needing to close a file and re-open it to refresh the design view. Because if I edit for example some data templates, the changes I made in the code part of the split view, are not reflected immediately in the design part of the split view.
Hence, I need a way to make blend reload the file.
EDIT: One way to overcome this limitation is to make the content inside your data-template a user control and edit that in Blend.
But my initial question still stands.

Related

How do I stop visual studios from adding functions while creating forms?

I've always been annoyed that visual studio always thinks a double click means create an action function while creating a form. Sometimes I double click on a label to change the text like I do in other programs then I have to delete code and click back to the form editor.
Is there a way to stop this when I'm setting up a form then turn it back on when I am ready to code?
Thank you for the help.
This is probably better off as a comment, but I lack the rep to comment.
You can't stop this behaviour.
The simplest (and as far as I'm aware, only) "solution" (read: workaround) is to just CTRL+Z twice when this happens (doing it once will cause your form designer to show an error, because the event binding will exist in the form, but the associated code won't exist).

Is there a way to record and replay coding in visual studio 2012?

I'm going to do demo based presentation. So what I want is prerecord(not a video record) my demo and replay while the I'm doing the presentation. Pre-record and play as in save code segments and generated some kind of list and then when I click on the list item generate relevant code and insert into code editor. Is there any macro base or any other way to do this?
Please do ask question if this is not clear.
Update 1
#jerek has answered the initial question. Going forward is there anyway to replace/edit existing code?
Open Toolbox (View | Toolbox)
Select code from editor
Drag and Drop into Toolbox (you can give it a short name from context menu)
When needed drag and drop back from Toolbox back to code editor
PS: 3b - instead of drag and drop you can also paste code from clipboard using context menu on Toolbox window
The Undo and Redo stack buttons are really useful. They might be enough for what you want to do (basically CTRL-Z and CTRL-SHIFT-Z but you can roll forward over multiple redo's)
This might be a bit basic, but essentially will allow you to go forwards and backwards through your edits.
With Visual Studio, you can code everything and then undo and redo your work. Then record everything with one of these.

How to Navigate / Move Cursor by code block in VisualStudio

I want to be able to move the cursor (not move the line of code) in the text editor up a block or down a block by pressing <ctrl>+<uparrow> or <ctrl>+<downarrow>. In jEdit, Leafpad, etc, this just works out of the box. I do not want to move an entire page at a time, just simply go to the start or end of the text block that I happen to be on.
Specifically, I want this, but for VS 2012 (which no longer has macros):
keyboard shortcut to move from one code block to another in VS2008
I've seen these posts, and they are not what I'm after; I do not want to move code, I want to move the cursor to the top or bottom of the block I happen to be on.
Visual Studio: hotkeys to move line up/down and move through recent changes
Visual Studio - Scroll AND move cursor
I have checked in ReSharper as well, and cannot seem to find an answer there.
Does anyone know of an add-in that provides this functionality?
Bind them to Edit.PreviousMethod and Edit.NextMethod in the Options->Environment->Keyboard?
I removed everything that was bound to these shortcuts, then bound it to Edit.PreviousMethod and Edit.NextMethod. This put the focus on the method box in the editor, but then you have to press enter to get it to navigate to that method.
The best I could find was using ReSharper, which I was trying to avoid. However, I'm a minimalist and ReSharper got in my way, I was leaving it toggled off almost all the time, so I uninstalled it.
I believe it was ReSharper.MoveToNextMethod or .NavigateToNextMethod, but I have uninstalled it so I'm going on memory. Using it, it would jump to the beginning of the previous or next method, which was not quite what I was looking for, but better than nothing.
Edit: I gave up. I moved to .Net Core for c# code and do all my editing outside of Code, using text editors that employ common keyboard shortcuts like Geany, jEdit, etc.

Refector-Rename ASP.Net Controls

Is there any way to Rename ASP.Net Controls without searching the complete Markup or Codebehind.
In Visual Studio there is Refactor Rename but this only works in Codebehind I still have to search the Markup code.
I'm using VS 2008.
Yes. I've found that the easiest way to do this is from the code behind.
There exists a shortcut called Rename Refactoring that is bound to the keyboard combination (Ctrl+R, Ctrl+R). The combination is listed as "Refactor.Rename" in the keyboard settings, if you want to change the shortcut (or if it's not bound, for some reason, you can set it yourself.)
To rename your ASP.NET control, navigate in the aspx.vb file to a reference of the control. Put your mouse cursor on the variable name. Press the keyboard shortcut. Now, you can either start typing (will erase the previous name and start typing a new name), or click somewhere or use the arrow keys to navigate to a specific position in the variable, after which you can add/remove/change the name as you please.
Clicking elsewhere will not apply the changes. To apply the operation, either click "Apply" in the dialog at the top-right that appeared, or press Enter.
The ASP control will be renamed in the VB code, and in the aspx code!
Note that there are certain file types where Refactor.Rename is "not available", such as .ashx or Visual C++ files.

How do I edit work items in the Visual Studio 2008 xml editor?

I'm trying to customize some TFS work items via the VS2008 xml editor, but every time I open a work item xml file it jumps to the graphical designer. All that gives me is a "View XML" button that doesn't let you edit the xml directly.
I don't have TFS but I know in regular VS there is an Open With... option in most items' contextual menu that even let you change the default editor. Very useful when you are tired of the Designer opening instead of the Code file on Windows forms.
Ah, looks like you have to go to File->Open and click the down arrow next to the Open button to "Open With" the xml editor. If someone wants to copy and paste this, free accepted answer :P
As per Coincoin's answer, this feature is also great for setting the default editor for ASPX. If you want to go to the Code Editor most often, then this is a default you'd want to change.
Reading this - I think perhaps you don't realize - that there is no need to edit the XML - in fact it is very difficult to do so. The graphical designer will actually let you change the Work Item type, adding new fields, changing workflow, rules etc.
The only reason to change the XML is if there's a bug in the Process Editor (the tool that gives the graphic designer). I have done extensive modifications of Work Item types and only had one instance where I had to change the XML.

Resources