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.
This will bring the definition class with in the same code editor by splitting the window.
You can change, edit within the Peek Definition windows as like normal editor.
If you are navigating through multiple classes / files, a doted breadcrumb will appear to help you on navigation across with in the same windows.
This working in a same way for XAML code block as well.
Here is something with ASPX page..
Happy Coding ! Enjoy !