Microsoft visual studio express 2013 modify xaml with a visual editor - c#

Is there any way to add components in a drag and drop fashion?
Here is what my environment currently looks like:
Right now I can only modify what my window looks like through xml, which is undesirable. Is there anyway to drag and drop buttons and stuff?

Right click the file, -> Open with... -> pick XAML UI Designer, and check Set as Default.
You selected the XML Editor as the default for this file type previously, so things like shift+F7 to change to design view aren't available. Changing the default back will fix this.

Yes. Visual studio comes with Expression for VS, a built-in XAML Editor:
Check your settings when you open the XAML. Make sure you are using "Automatic Editor Selector (XML)" which should default to the XAML UI Editor

Yes, of course. I don't know why there's not a UI tab in the screenshot you posted, but pressing Shift-F7 should swap you to the designer UI. If not, a quick web search for "xaml designer" should point you in the right direction. There's also Expression Blend, which is a more robust tool for designing XAML styles and controls. Once you reach a moderate level of complexity, you'll probably start using Blend or hand-editing your XAML more than using the designer.

Related

"Go To Definition" from a .xaml.cs file takes me to .g.i.cs files instead of to .xaml file in Visual Studio 2015

I am used to Visual Studio Go To Definition (or ReSharper's Ctrl + left click) in code behind on an element name defined in XAML to take me directly to XAML of that element. For some reason it's taking me to .g.i.cs file instead. Where as it's not a huge problem it is annoying as hell. This is also not specific to my project - I can create a new WPF project, add a single button to XAML and get the same result trying to go to the button's declaration in XAML from code behind file.
I tried to do the same thing in VS 2015 Professional on another computer and get the same problem.
But when I do this in Visual Studio Enterprise 2015 on my Surface, it works correctly and goes to XAML (all testing done with new WPF project) - I can't find any option anywhere that would control this.
Any ideas for this would be greatly appreciated.
Well, it seems as ReSharper actually changed the behavior - very naughty. I am happy to say that ReSharper 9.2 fixed this problem (I was using 9.1.3 initially).

New Blank Page(XAML) projects = Controls are not showing on the MainPage(only their borders are)

I'm new to Visual Studio and couldn't find my answer anywhere else for hours over the internet..
I'm Using "Visual Studio Express 2012 for Windows" and everytime I create a new project with a blank page (XAML), the designer only shows me the frame of the page with its missing background.
And any control I drag to it, is invisible (I can only see the square border of the control I dragged but no texture..)
This is only happening during design time. On RunTime it actually shows up..
This is happening to me since I had the first fresh install. Just to be clear, I am NOT opening an existing previous project.. I have non. This is the first time I make a project in C# and I'm surprised I didn't find anything useful so far over internet search..
Also tried installing, uninstalling, repairing and changing to different versions...
The problem didn't show on Visual Studio 2012 Express for Desktop, but this product doesn't seem to be fit to my needs.. (I'm trying to also learn how to develop for Windows Store and other products)
The IDE doesn't show any errors or warnings..
Help would be much appreciated!
P.S - I'm running Windows 8.1
You can try Blend to open the project and render the xaml,if the problem appear too, maybe you should check out your graphics card or update driver.
try with this!
Check the following:
Tools -> Options
Expand Text Editor -> XAML -> Miscellaneous
Make sure that "Always open documents in full XAML view" is not checked
Or perhaps the default program for opening .xaml files has changed:
Right-click your .xaml file in Solution Explorer
Click Open With...
Select XAML UI Designer
Click Set as Default button
Click OK
If it's related to the video driver, maybe disabling hardware acceleration will help?
Or you could try Visual Studio Community Edition (http://www.visualstudio.com/, click on the Download button under "Free developer tools"
Did one of these suggestions work?

Is there an equivalent of MonoDevelop's Document Outline in Visual Studio 2012?

MonoDevelop has a Document Outline (Class Outline?) window that displays all variables, methods, and regions:
Is there an equivalent to this in Visual Studio 2012?
I had the same question and my prefered solution is:
Jetbrains ReSharper (8.0) has a File Structure window which shows the structure of the current file as tree (types/members) and regions are also supported.
Code Maid is a free Visual Studio extension that adds a digging window tool.
This will answer to your needs, I believe.
This tool also allow you to reorder code elements with drag & drop directly within this window.
The solution explorer gives you most of this by default if you expand a class by clicking the little sideways arrow.
The icons and colours next to methods and variables indicate things like access level, return types etc
There's Class View which can be opened from the View menu (CTRL + SHIFT + C)
It's not exactly the same as the image you've provided but it's very similar.

Can I use a UserControl from the same project without making a DLL?

I made a User Control and already was able to use it by adding it to a form in the C# code. The User Control is in the same VS2005 Project as the main form.
The problem is that I can't see the User Control in the gui editor ([Design] window) with this implementation. I tried many things but I wasn't able to add the user control to the real form desing.
I read some things about making a control lib dll and then add this dll to the toolbox but I don't want to have an additional project and an additional binary file.
How can I use a User Control in an form Design, if both are in the same VS Project? I think somehow this should be possible?
Edit 1:
Sorry I have Visual Studio 2005 not 2010
It's certainly possible to use a UserControl in design mode when it's part of the same project.
Do note, however, that it will only show up in your toolbox if you have enabled the "AutoToolboxPopulate" setting. Go to the "Tools" menu and select "Options". Expand "Windows Forms Designer", and click on "General". Make sure that the "AutoToolboxPopulate" property is set to True. When you rebuild your solution, your UserControl should show up at the top of your toolbox, ready to add to your form.
Alternatively, you can add the UserControl to your toolbox manually. To do that, right-click on your toolbox and select "Choose Items" from the context menu. Navigate to your control, ensure that it is checked in the list, and click "OK".
In the event that an exception is thrown (like MacX mentioned), you will still be notified by the designer. The control will still show up in the toolbox, and you'll still be able to attempt to add it to your form.
As APShredder already mentioned the control should automatically appear in the toolbox. If it doesn't check your Visual Studio Settings:
Tools - Options - Windows Forms Designer - General - AutoToolboxPopulate - True
For further informations just read the Walkthrough in the MSDN.
You should be able to use a custom User Control in the Winforms designer. You have to build your project first however. You can do this by going to Build --> Build Solution or by pressing F6. Then your control should appear in the Toolbox.
Yes, in the toolbox, right-click and choose "Choose items...". Then navigate to the ".NET Framework Components" - your controls should be listed in there. Just choose to add them.
There should be no Problem with the Control, except you have an exception which is thrown within the constructor or the Load-Event. The the Designer is not able to display the control correctly.
In VS2010 after you create a User Control and compiled it, VS add automatically your component and make it visibile in his namespace on ToolBar.
This can be done in Both WPF and old style code/Components...

Can't see Methods, etc. in Visual Studio 2008 C# Code

I typically code in VB.NET, but I'm going through a tutorial in C# .NET right now. I'm expecting to see a drop down list for selecting methods and properties at the top of the code file, right underneath the tabs for the code files I have open. However, I do not see these. If I open VB code, it works just fine. I've tried to look for an option in Visual Studio that I don't have turned on, but I can't find what I'm missing. Anybody have any ideas?
Go to Tools->Options->Text Editor->C#->General and check "Navigation Bar"
If you want to access the events, you can do it on design mode on upper border of the properties box, there is a "thunder" where you can access them, this part is different from that of VBasic
Tools Menu --> Options
Text Editor ---> C# ----> General ----> Navigation Bar (check this box)
Reset your entire environment. Tools--> Import and Export Settings... from this dialog you can reset your IDE settings, choosing to Reset all environment settings to one of the default collections of settings. (VB Developer, C# Developer, Web Developer, Project Manager...)

Categories