How do I switch between page edit mode and template edit mode in the Visual Studio 2012 design view? - xaml

When using the design view in VS 2012, if you right click on an element and select one of the templates from Edit Template or Edit Additional Templates, it takes you to a new view within the designer.
This may be a silly question, but how do I navigate back out to the main view?
In Blend, I just use the little up arrow next to the template name but that doesn't seem to exist in VS.

One way to return is to double-click on the artboard, just outside the template area.
Another, that is more in line with what you are used to from Blend can be found in the Document Outline panel. There is that little arrow.

Related

Ctrl+Shift+Tab in Visual Studio 2017

I'm using Visual Studio 2017 and have followed the instructions in this answer to change the behaviour of Ctrl+Tab and Ctrl+Shift+Tab to switch to next and previous tab, respectively.
Problem is, while Ctrl+Tab works fine, Ctrl+Shift+Tab only switches to the previous tab when the current document is not a Web Form or similar (e.g. master page). On those pages, the combo switches between Source, Design and Split view instead. How can I disable this behaviour?
I've looked through the keyboard shortcuts in Visual Studio settings and haven't found any others that are mapped to that combination. I've even disabled Web Forms designer (so only Source view is available), but it doesn't help, Ctrl+Shift+Tab simply doesn't do anything then.
Set the shortcut keys for the Window.PreviousTabAndAddToSelection command in the HTML Editor Source View (instead of Global) to Ctrl+Shift+Tab. This has the minor side effect of selecting the previous tab when navigating away from a web form tab, but successfully avoids the unexpected behavior of taking you to the split or design sub tabs.

How do I get Visual Studio 2012 to generate code from a windows form design?

I am trying to add a simple windows form to my VB.Net project. I have used the designer to design the form how I want it with buttons, a text box and a Timer. The problem is when I try to view the code, there is only an empty class that looks like this:
Public Class MCastMain
End Class
I have set the application type to a windows form application in the project properties, and I have made a successful build of the application since doing so. I have been scrawling the internet and this forum for about half an hour now and I can't find one other person who is having this problem, nor can I find a tutorial that mentions any special steps that must be taken beyond what I have done. This is the first project I have done in Visual Studio.
I know this is probably stupid simple, but I have no idea what to do. Any help is appreciated as always.
Forms comes as partial class meaning the code is separated in two files.
The "empty" code you shown is from "mcastmain.vb" (if the file is named as the class).
With that one there is a (probably hidden) file "mcastmain.designer.vb" file which contains the generated code by the designer ; and is not meant to be modified (as any designer change will rewrite the file).
To show the hidden files you have to look in the solution explorer on the button on it's top there should be a "show all files" button. (it may be possible to do the same via the menu but I don't have VS right there to be sure where)

Editor context Menu - Eclipse-RCP

I have an Eclipse RCP application. I have created an Editor. There are few context menu (default), when I right click on the Editor. I have not created these menus.
Please let me know, How to remove the context menu of the Editor?
It needs different approach by which editor you extends.
Let me know What you extends, than I can answer more efficient one.
In general way:
IWorkbenchParSite#registerContextMenu(...) will be used, So find where calls that, override it. It is not recommend. Because by doing this, Menu Extensions which is contributed for your editor will not work anymore.
If you mean the system menu that appears on editor tabs and view tabs, that menu is provided by the presentation (2.1, Classic, Default, etc). There is no tweak to simply modify it.
The 2 ways to remove it would be:
write your own presentation, using
the
org.eclipse.ui.presentations.StackPresentation
API and matching extension point.
Writing a presentation is a involved
undertaking.
Change the internal classes in the
org.eclipse.ui.workbench plugin
and patch that plugin in your RCP
app.
If you use Text or StyleText you will get the system default menu (cut,copy,paste, maybe something about encoding or input). If you are not going to supply your own menu, simply create an empty SWT Menu and set it:
Menu emptyMenu = new Menu(text);
text.setMenu(emptyMenu);
Eclipse also has a text editing framework, if you need more than a basic text box you should check it out. http://wiki.eclipse.org/The_Official_Eclipse_FAQs#Text_Editors

How to launch an SP 2010 Dialog Window Maximized

I have modified EditForm.aspx of a list in SharePoint 2010. I need to launch the dialog window (that's what EditForm.aspx seems to be launched as) maximized, but I haven't been able to find the correct setting to tweak.
A quick web search suggests to use the showMaximized:true style setting, but I am unable to find the element in EditForm.aspx to apply this attribute to.
If you want to remove ALL dialogs from a list, go to:
list settings -> advanced -> dialog -> turn them off
But if you just want to change the edit button, you will probably have to create a new edit <CustomAction> that uses javascript, see this example:
http://www.chakkaradeep.com/post/Using-the-SharePoint-2010-Modal-Dialog.aspx
Its for a different button, but you should get the idea.
And then you will need to build a <HideCustomAction> to hide the original edit button
Check this : http://www.wawawum.com/blog/post.aspx?id=66a5aed2-f530-4687-bd42-1ef0fb379544
Add a Content Editor WebPart to your EditForm, then put the code found in this blog to maximize the Dialog when opening it.
Works very well for me.

Display QuickLaunch on WebPartPage in sharepoint 2010

I'm trying to work out how to get sharepoint 2010 to display the quicklaunch on a web part page, the default.master trick I used in 2007 doesn't appear to work any more.
In my 2007 install, I simply edited the default.master and moved the quicklaunch code outside of the PlaceHolderLeftNavBar element but this doesn't have any effect in SP2010.
Thanks
A simple way to eneble Quick Launch Menu on WebPartPages is remove tags UIVersionedContentUIVersionedContent and PlaceHolderLeftNavBar using SharePoint Designer 2010.
See this article: http://denmartins.wordpress.com/2011/05/07/exibir-menu-quicklaunch-em-webpartpages/
If you really want to place another copy of the quicklaunch on a web part here is the steps
Using Sharepoint Designer 2010 go to your site and navigate to Master Pages -> v4.master
Click edit file copy everything in the <div class="ms-quickLaunch"> that should copy everything you need for the quicklaunch to run. For best result use the code view and hover over the quicklaunch and you should see the div, click on it and copy (Ctrl + C)
Now you can paste that on another web part page and it should work, I tried it by creating a new test page and it worked
You need to make changes in v4.master (in masterpage library), not in default.master.
For details on SharePoint 2010 master pages, please, follow this link:
http://sharepoint-sandbox.com/index.php?/Tips-and-Tricks/Customization/tip-80-sharepoint-2010-new-masterpages.html
Your masterpage trick on my SharePoint Foundation 2010 environment works fine.
Anyway, I don't think, that moving any standard code from placeholder is a good idea. If you want change position of quicklaunch menu, you should move the leftnavbar placeholder itself, including all the contents.
Placeholders are generally used to allow some pages, for example application pages, replace placeholder contents. So, if you hide the placeholder, and move it's contents out, these changes will be lost, and the standard menu will be shown. (and if you do not hide the placeholder, you can get two menus on one page :) )
Hope it helps!