Peek Definition Everywhere – Using it with CSHTML, XAML, ASPX …  along with C# in Visual Studio 2015

Peek Definition Everywhere – Using it with CSHTML, XAML, ASPX … along with C# in Visual Studio 2015

Peek Definition improves overall developers productivity and getting things in a smart manner with in the Visual Studio IDE. This provides a seamless  view of source code without loosing the focus in different part. We have seen this features with C# code earlier version of Visual Studio and with productivity power tool. Here is couple of previous posts on Peek Definition – View Code Definition with in Same Code Window – Peek Definition in Visual Studio 2013 Preview ,    Peek Definition in Visual Studio 2013 is now all about Ctrl + Click . The fundamental of this features is very similar to how the traditional “Go To Definition” works. The only difference you will find is, it will display the code in the same window as an extended editor.

Along with C#, Visual Studio 2015 now  introduced this features for  XAML, CSHTML, ASPX ….. as well.

Consider you have following code block in CSHTML, and you want to see the View ModelViewModel for some of the binding. To use the Peek Definition, instead of navigating from the files, Select items for which you want to check the definition,  select “Peek Definition” from the context menu.

image

This will bring the definition class with in the same code editor by splitting the window.

PeekDef

 

You can change, edit within the Peek Definition windows as like normal editor.

image

 

If you are navigating through multiple classes / files, a doted breadcrumb will appear to help you on navigation across with in the same windows.

image

This working in a same way for XAML code block as well.

Peek Definition

 

PeekDef2

PeekDef3

 

Here is something with ASPX page..

image

 

Happy Coding ! Enjoy !

Abhijit Jana

Abhijit runs the Daily .NET Tips. He started this site with a vision to have a single knowledge base of .NET tips and tricks and share post that can quickly help any developers . He is a Former Microsoft ASP.NET MVP, CodeProject MVP, Mentor, Speaker, Author, Technology Evangelist and presently working as a .NET Consultant. He blogs at http://abhijitjana.net , you can follow him @AbhijitJana . He is the author of book Kinect for Windows SDK Programming Guide.

4 Comments to “Peek Definition Everywhere – Using it with CSHTML, XAML, ASPX … along with C# in Visual Studio 2015”

Comments are closed.