So I want to start doing c# from head first c# 3rd edition, the big problem is that I can't find neither blank page and I saw alot of people saying that using WPF is okay, but when I try and add a new item I see nothing related to c# or what I actually need, what I need is a basic page, here is how it looks like:
now the problem is I can't fix it to show me what I need only for c# I tried, community,enterprise.
Does anyone have any idea of how to fix this?
You seem to be trying to add an item at the solution level. Note that in the screenshot it says "Add New Item - Solution Items". This will create files that exist in the solution, but no belong to any particular project, not affecting the output of compilation of any project. That's the reason why you don't see anything code related, you're not editing a code project.
Instead, right click on the project item on the solution explorer (not on the top solution item) and add a new item there. The selection of options will be specific to the type of code there. For example for WPF you'll get all XAML-based file types, or for Winforms you'll see forms and control classes.
I had this same problem I am using Visual studio 2015 community edition, the problem is you have created the wrong project to start of with. The screenshots in the book are from VS 2013 so it will look a little different.You need to create a Blank App(Universal windows 8.1) highlighted in the image attached and not Blank App(universal window). Once I done this basic page will no be available in the add new item page.
VS 2015 Screenshot
Related
I followed this; Create a Windows Forms Toolbox Control from msdn, and was able to successfully create my own custom toolbox control and install it and use it. Perfect.
But, when I try to add another control file to it-for example in solution explorer I have ProjectName and then inside of that I have CustomToolboxControl1.cs(which works fine) and then I have CustomToolboxControl2.cs. CustomToolboxControl2.cs; for whatever reason does not appear in the toolbox, everything compiles fine with no compile or runtime errors, and I set it up exactly like I did the first one.
I've tried searching Google, YouTube, StackOverflow(Which I came across a few "solutions" that didn't work for me 'cause it was way outdated from like '08 and such), and can not for the life of me find out how to add multiple custom WinForms UserControls from one VSIX project. Not sure if I'm just not wording my searches correctly or not but...Here I am, makin' my first post here on StackOverflow. Hopefully I'm doin' this question thing right, it seems like a lot of SO posts I come across are people just getting anal in the comments about how the question was asked lol.
Here's some images that will hopefully further help:
The controls are CoffeeComboBox(the one that works) and CoffeeTabControl(the one not showing up in toolbox but compiles fine and is setup the same way as the other one):
Solution Explorer
And here's what it looks like in the debugging instance of Visual Studio Toolbox:
Visual Studio Debug Instance Toolbox
Nevermind, I solved it.
I did everything correctly, but the Visual Studio Instance was just buggy. I decided to close VS, try installing the VSIX project anyways, and then testing it on an actual new WinForm project rather than just a debug instance of VS. It showed up just fine in the toolbox there. Was able to drag both of my custom tools that were properly placed under the specified custom tab, from the toolbox to the form just fine.
For anyone else that may come across this question, to further elaborate;
If you follow this guide to Create a Windows Forms Toolbox Control from the msdn(Microsoft Documentation) site, just rinse and repeat for any additional UserControl WinForms Controls that you want to add. To do that; Right click the project name > Add > New Item... > Extensibility > Windows Forms Toolbox Control > giveItAName.cs > Click Add bottom right. Done.
Closed.
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).
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?
I'm getting this error:
Error Creating Control - Label1
Cannot find web project item 'http://localhost:61952/WebSite/Default.aspx'.
(It's a Visual Studio 2010 Website.)
Can't view Labels, User Controls, nothing in design view... Can't drag and drop controls from the tool box either...
I have no idea what caused this problem...
Any hints?
Thanks.
Just to get me going with the design mode...
Well, I have a visual studio solution, with projects and class libraries... and my website which I described as having the problem. However, this problem seems to only occur when I'm trying to view the website's pages (in design view), after opening the solution. I tried opening just the website (File -> Open Web Site), and in that case, I am able to use the design view with no problems...
(Adding a new website to my solution also works, only my existent website doesn't work.)
So, solution for the meantime: having two VS opened, one with MySolution/WebSite/, the other with MySolution/CompleteSolution.sln. I do the design stuff in the first and the programming in the second...
Just now I found the solution, just do Unload Project and load it again to existing solution, right now at the time you open the website, it will be fixed :)
I'm using Visual Studio 2005 w/.NET 2.0. I have no idea what happened, but all of a sudden I noticed that the Properties window for ALL of the DataGridViews in my project went blank. I've tried dropping in new ones..still blank. I restarted Visual Studio and my computer...still blank. I've done some google searches, and I've found people who have had the same problem, but there is no solution and it appears that Microsoft has been unable to duplicate it. Any ideas?
I created a new project in a new instance of Visual Studio and dropped a DataGridView in there, and it worked..then I checked my other project in the other instance of VS and the Properties can back for my DataGridViews. Fluke or solution? No idea.
I have had similar problems where my property windows go blank. It tends to happen when your machine is using a lot of UI resources or your toolbox is trying to update its list of controls.
Check to see if your control is being selected by your property window at the top of the property window screen
Try switching to a different control and then back to force the property window to update
Just close your UI Designer and re open it.
If all else fails, just close and reopen your solution
If it's still a problem you can always reduce how much memory your toolbox/UI designer uses by removing custom control generation in your toolbox window. To do this go to Tools / Options / Windows Form Designer / AutoToolboxPopulate - set to false. Now this will not populate your toolbox with custom controls anymore from your solution.
This same thing happened to me because the full path of the project contained an '&'. When I moved the project to a path that did not have an '&' everything worked.
There was same problem - reason was '&'.
I had a bunch of similar problems with Visual Studio UI doing wacky things. I figured it had to do with memory consumption (not a lack of machine memory). Jetbrains made a wrapper here that has solved a lot of my problems in Visual Studio 2005.