Data sources tab is missing in visual studio 2010 - visual-studio

I started reading the Pro Business Applications with Silverlight 4 and I'm having the following problem here with my visual studio 2010
I can't find the data sources tab page as mentioned here:
When you open the Data Sources window in Visual Studio, you will
find that a data source has
already been created for each domain context created by RIA Services
in the Silverlight project, with the entities that they expose beneath
them (as shown in Figure 6-2). Dragging and dropping one of these onto
your design surface will create both a DomainDataSource control and a
bound control to display the data.
I know that the Data Sources window and Data menu are intentionally disabled in Websites and Web Application Projects but my project is a Silverlight business application.
Can someone tell where i can find this window or what should i do to create the DomainDataSource control and the bound control?
Thanks!

If you have MainWindow.xaml open, the DataSources tab is normally right next to the Toolbox tab.
If it does not appear there, go to View -> Toolbars, and turn on the Data Design toolbar. Click the Show Data Sources button.
Or just use Shift + Alt + D

When I create an empty project, I am able to access Data Sources as follows:
Select a project in the solution explorer. (Not a solution!)
The 'Data' menu on the menu bar now allows you to access the data sources for this project, along with other Data Source related options.

OK, i got a workaround. For some reason, it only shows up if you do a Silverlight project. So I started a blank solution, added a silverlight project. Bingo - there is the Data Source window. Now, add whatever project you really need.

You may need to build the project that contains your objects before the objects appear in the tree view.
Pablo

You can find this toolbar option in View -> Other Windows -> Data Sources or use
Shift + Alt + D

Related

VS2012 Premium: "Data Sources" menu item is missing

I am using VS2012 Premium. I do not have a menu item to launch the Data Sources window. According to MSDN I should have a menu item:
On the menu bar, choose View, Other Windows, Data Sources (or choose the Shift+Alt+D keys).
but I have no such item.
The shortcut doesn't work either. I have reset the shortcut from Shift+Alt+D (which drops down the Debug menu item) to something else but this still does not display the window.
I have created a new VS solution which is not an MVC website (a WCF application) to address this suggestion that the option is hidden in MVC sites.
I have also run devenv /ResetSettings
as suggested on this MSDN forum posting.
Has anyone any ideas how I can launch the Data Sources window?
Thanks.
It depends on the project type you choose. For instance, a WCF Service Application project will not show you this option, while WCF Service Library project will show you the option.
The issue I had was that my Report Data pane went missing when working with RDLC files.
Click somewhere on your main design working area (in my case the design area for the RDLC I am updating).
Then go to the View menu -> Report Data.
The Data Sources and DataSets are now available in the Report Data pane.
Another possible solution for some:
I've noticed that the View > Other Windows > Data Sources option is not available when the active file in the main window is a .sql query file (I'm sure this would be the case for other types of files as well).
In this case, simply selecting a file associated with the solution will make the View > Other Windows > Data Sources option available again.

How to add controls from a control library to VS studio toolbox automatically (WP7)?

I want to achieve that when the user installs the WP7 control library he will find it in the Visual Studio toolbox automatically without manually adding it. In addition I would like to organize toolbox tabs in a logical manner.
I know it can be done for other platforms. For example I tried writing *.design.dll as described here - it does not work for WP7.
Any pointers how to work with toolbox for VS 2010 / WP7?
Nobody answered, so here is my brief summary:
The control library cannot be added to the Toolbox automatically unless you program VS plugin (package). Too much work for me...
*.design.dll (see the link above) basically works.
2a) You can hide controls from the Toolbox (BrowsableAttribute) and you can define control icons. That's probably everything you can do for Toolbox. The user has to add Toolbox tabs and "choose items" manually.
Well, I am not quite sure here, because when you drop the control dll file onto the Toolbox, then at least ToolboxTabNameAttribute works, i.e. corresponding Toolbox tabs are created automatically. Unfortunately, the tab is empty.
Also, when the control library is properly installed, then some of the controls are added to Choose items Toolbox dialog. Unfortunately, in my case most of the controls are missing and have to be added by manual browsing.
2b) Designer support (Properties window for the control) is better. You can hide properties (BrowsableAttribute), define categories (CategoryAttribute) and define descriptions (DescriptionAttribute).
Descriptions can be extracted from you documentation xml file, so that you don't need to write them again. To get the code google for MetadataBase.cs. Just be carefull, the files you'll find contain fatal bugs (ParseDescription method) and ignore some properties (getters that return a collection).
After all, the result is not that bad.

VS2010: Why do my custom Toolbox tabs and contained controls keep disappearing?

This is how I expected the toolbox to work:
Let's say I add a custom Tab to the Toolbox called "Ajaxtoolkit." To add controls to the new tab, I right mouse click and select "Choose Items" and browse to a file, Ajaxtoolkit.dll, that is of a particular version number.
I would expect that when I save and reopen the solution, that the Ajax Toolkit custom tab would still be in my Toolbox and that it would contain the same controls that were there last time, the controls that were in the dll that I referenced when the controls were added.
If I created a brand new web app, I (possibly) wouldn't expect to see the same Ajax Toolkit custom tab. However, I could perform the same steps as above and add a "Ajax Toolkit" tab and perhaps, this time, select a DIFFERENT VERSION of the tookit, and the state of the toolkit would be retained with each solution file.
Another possibility would be for the original Ajaxtoolkit to be retained when the 2nd web solution is created, and perhaps, if I wanted to mix versions of the toolkit across diffreent web sites in my solution, I should start naming my custom toolkit tabs with version specific names like "Ajaxtoolkit 4.0," etc.
...But instead, the Ajaxtoolkit tab disappears when I close VS2010 and reopen it.
Why? Is this desirable behavior or a bug?
You know VS2010 is a fully customizable IDE, may be these features conflicts your toolbox customization.

Visual Studio UI Improvement OCD Mode

I am wondering if anyone knows how to pull this off. Here goes.
I have a multi monitor setup, and I maximize Visual Studio to both windows. I create a new vertical document tab control, so that I have one document tab control in each physical screen. This is fine.
Now, I want to be able to make them work as if they were connected. I want to have the designer on one side, and the code related to the displayed designer on the other window.
I'd like it to have the following functionality:
If a item is double clicked on the solution explorer, open designer/code in both tabs.
When a document is selected in either pane, open appropriate file in the other pane.
Make the designer view refresh on edit, or periodically.
Any ideas on how I could pull this off?
Try to check (wait) for VS 2010 (beta now). There should be multi monitor support.

Associate web page with project in Visual Studio

Is there any way to associate a web page with a project in Visual Studio, and have it load up in the IDE? For example, I have a project who's task list is maintained on a web site. It would be ideal to see those tasks within the IDE instead of a separate page. I can accomplish that now by following these steps:
Press Ctrl-Alt-R to open a Web Browser page
Change the URL to my desired path
Position the page as desired (like in its own tab group, off to the right of my code)
It would be nice to have a link somewhere in my project that I could click and open this page in the IDE without changing the URL every time. I have several different projects that would benefit from this. Any ideas?
Something like this happens with Visual Studio Team Foundation Server. The various documents and guidance associated with your current Team Project area accessible from within Visual Studio, in the Team Explorer window.
You can also create a Guidance Package to apply various commands and pieces of documentation at appropriate places within your projects. see Guidance Automation Extensions and Guidance Automation Toolkit.
Nice idea. The only thing that I can think of is via Visual Studio Extensibility. Basically,
Define an MSBuild property in the project file or a custom field in the solution file that has the project url.
Write a VS package that subscribes to the solution load event or something similar (I am not familiar with VS object model but I am sure there is an event like that) and looks for that custom field and extracts the url if it exists in the solution or the project file and then opens a web browser within VS that points to that url.
Here's my quick hack around this problem:
Create a text file in the project. I called my "notes.txt", and I use it to store notes, ideas, etc. that don't have a home elsewhere in the project.
Add the web link to the top of the file.
Open the text file in the IDE and put it in a new tab group. I put mine in a vertical tab group off to the right.
Drag the separator as far over as it will go to "hide" the tab group. This way it's always open and available but not taking up much space.
When you want the web page, "show" the tab group (i.e. drag the separator back) and ctrl-click the link.
This has the added benefit of opening the web page in the same tab group as the text file, so you can push them both aside when not using them.
I'm sure there's more that could be done by writing packages as others have suggested, but this was a low-effort way to get me close enough to what I wanted. I'd love to hear other suggestions or modifications that might make this setup better.

Resources