I'm working on a new app that has large areas I would like to comment out while I work on different parts of the page.
Is there a way to collapse the commented areas in Visual Studio 2010 in a c# razor file?
Yes you can!
Select the code/comments or what ever you want to collapse...
Then, right click and choose Collapse Tag.
The only drawback is that it doesn't persist. As soon as you close the view it won't be there when you re-open it.
The only other suggestion I could make is separate parts that you're working on into Partial Views. That way you can work on smaller pieces and won't have to worry about collapsing anything.
Related
In compare option inside the source control, the scrolling is bind together for both files.
I want to scroll just one of the sides while the other stay pinned also I want to avoid comparing outside on the VS.
I can't find any solution online and there is no obvious option in the VS.
I'm Using VS2015 with TFS.
Thank you.
EDIT
New feature request for microsoft was opened
Feature request
EDIT
In VS1029 Version 16.11.3 feature exist, by pressing it you can unbind the windows
In compare option inside the source control, the scrolling is bind
together for both files.
For this , I am afraid this is by designed. The same is true for my test in visual studio2019.
You could add your request for this feature on our UserVoice site , which is our main forum for product suggestions. After suggest raised, you can vote and add your comments for this feedback. The product team would provide the updates if they view it.
Visual Studio WP 2010.
I'm using scrollviewer for text and images on a page, but in design view in VS I can only view the first part of the page which makes placing text and images difficult. I can take a guess and then run the app in the emulator, scroll down to see how far off I am, then go back in design view and try to set margins, height, etc appropriately. Is there another easier way to do this?
Just a guess: During creation set the ScrollViewer's VerticalOffset.
I found the answer elsewhere. In the top section of your xaml find d:DesignHeight="696" and change the 696 to something like 2000, etc. This will extent the viewing area. Anytime you reload or run the application it will default back, but it's easy to reset.
I have been using Visual Studio for 5 years. I have never used Design view. I am just starting a new, hobby, site and find myself using default.htm instead of .aspx as there will only be html.
I thought, for a laugh, I'd use Design view - as it's more intuitive to type our your text rather than endlessly doing it in the source view with all the tags to disrupt your creative juices.
But, when I click Design View, the screen is blank. There are tags across the bottom - html, body, topdiv, divcontainer etc. - but it doesn't matter what I click on, the screen is empty.
Click on source and all my carefully crafted text is there, click on Design and nothing is there.
So, I'm being thick - is there some trick to get Design view to actually show something?
Any DevExpress control I use, just renders a list. I’ve tried all 3 possible syntaxes (listed on the site below) and every time, the control I want to use (TreeView, NavBar, etc.) just renders as a bulleted list. Any ideas why? I’ve checked Google and the DevExpress support center, but I can’t find any issues like this.
DevExpress with razor guide: http://documentation.devexpress.com/#AspNet/CustomDocument9944
I just put this code on my index page to test that DevExpress is working:
#{Html.DevExpress().NavBar(settings => {
settings.Name = "myNavBar";
settings.Groups.Add("Group1").Items.Add("Item1-1");
settings.Groups.Add("Group2").Items.Add("Item2-1");
settings.Groups.FindByText("Group2").Expanded = false;
}).Render();}
When it reaches the page, it just shows a bulleted list:
Group1
Item1-1
Group2
Any ideas what's causing this?
The project I was working on was being rendered inside another project. I just needed to get rid of my project's layout and add using statements to the cshtml pages:
#using DevExpress.Web.Mvc.UI;
#using DevExpress.Web.Mvc;
The only problem I still have, is the scriptlet code gets highlighted red (but it builds/works fine and has intellisense).
It seems that any required DevExpress' entry is not registered within the MasterPage (_Layout.cshtml) / Web.config http://help.devexpress.com/#AspNet/CustomDocument8163. I suggest that you use specially designed Visual Studio Project Templates http://help.devexpress.com/#AspNet/CustomDocument9145 to avoid missing any required DevExpress' entry.
In Visual Studio, you can expand and collapse code without using regions, for example in a code-behind page you can collapse methods, etc... And in an ASPX page you can collapse tags, tags, etc...
It's useful when you have a long page and you want to focus your development on a specific part. What's cool about it too is that you can close the file and reopen it and the state of the expanded/collapsed blocks is saved exactly as you left it.
Except in one instance. That state is not saved for tags in ASPX pages, where it would be most useful.
I know there are some good plugins out there for VS but I couldn't find one that addresses this issue.
Has anybody got a solution?
Before you mention custom controls, they are not always convenient or feasible when trying to keep a page short and I don't consider this a solution to this problem.
Looks like this issue will stay unresolved at this time.
I opened a bug report on Microsoft Connect, if this issue is important to you please vote it up!
https://connect.microsoft.com/VisualStudio/feedback/details/613221/expanded-collapsed-state-not-saved-after-closing-file