Tips & Tricks in Visual Studio 2015 – Part 1

Senthil Kumar / Friday, November 06, 2015

This is the first blog post of a series that I plan on writing about Visual Studio 2015 tips and tricks. In part 1 of the series, we’ll look at the some of the new features in Visual Studio 2015 including multiple sign-in, device preview for Universal Windows Apps, the integration option in Blend, the Xaml Peek feature, and more.

1. Multiple Sign-In

When you launch Visual Studio 2015 for the first time, you will be provided with an option to login with your Live account to synchronize your IDE settings. There are times when you might want to switch user accounts within the IDE. You can use the Account Settings option in Visual Studio 2015 to do that.

To launch the account settings screen, select your name from the top right corner of Visual Studio 2015. If you haven’t signed in yet, you will see a “sign in” link with which you can login to your live account.

The Account settings screen lets developers personalize their account. You can sign-out, login and add additional accounts. With the "Add an account" link, you can add more than one account to your Visual Studio 2015. This might be useful especially when you are working on multiple projects and each needs to have a different IDE setting.

2. Device Preview menu

When developing a Universal Windows Platform app, there are times when you might want to preview the page in the Xaml designer. To do this, you can use the new Device Preview menu bar. This new feature will show how your Xaml -based page would render on various devices.

The Device Preview menu is displayed just above the Xaml page in the Designer as shown in the screenshot below.

3. Integration with Blend

Generally, UI Designers use Blend to design the UI using Xaml with the help of design styles, animations etc. The developers use Visual Studio 2015 to write C# code and extend functionalities of the design. It could be possible that both the Designer and the Developer work on the same Xaml file, which would require the updated file to be reloaded by the IDE each time.

The above dialog lets the users know that the file was updated externally. In order to reload the file, you’d click the "Yes" or "Yes to All" button.  Once you do that, the updates that are made in the Blend IDE will be reflected in Visual Studio 2015 too.

Microsoft Visual Studio 2015 includes a new setting that lets you manage this behaviour, and you can access it by navigating to Tools -> Options. In the Options Dialog, select Environment -> Documents from the left sidebar.

Select the option "Reload modified files unless there are unsaved changes" and "Detect when file is changed outside the environment" and click ok.

4. Xaml Peek feature in Visual Studio 2015

The Peek Definition was one of the interesting functionalities that were available in Microsoft Visual Studio 2013. This feature allows developers to view and edit the code available in different files without even switching windows. You can use the shortcut Alt + f12 to open the Peek Definition window.

This feature is now available in the Xaml code editor too. You can select the code in the Xaml code editor and select Peek definition from the context menu and start modifying the code in the Peek Definition window.

 
 

5. Indication of Unused Namespace in the Code Editor

Microsoft Visual Studio 2015 provides an indication to the developer that certain namespaces are unused in the code. Visual Studio displays them in a grey color and the user can remove them from the current page since they are not used.

 

 So there you have it! These are just a few of the great new features in Visual Studio 2015 – stay tuned for part 2 when we dive into even more tips and tricks.

 

Infragistics Ultimate 15.2 is here. Download and see its power in action!