简体   繁体   中英

Is there any way to 'peek' a value from a Resources file in Visual Studio?

Most of the text in our application's UI is stored in Resources (.resx) files, in a separate project to the UI code itself. It's frustrating that if I see @HomePageResources.MainTitle or some such in my page's markup, the only way to see what text will actually be displayed after compiling is to either start debugging and load the page (even more frustrating that you can't then edit the value in the Resources file without ending debugging again), or navigate to the Resources file and then find the value manually, which, given the size of our solution, takes more than a moment.

It seems like the most obvious thing in the world that I should be able to hover my cursor over the reference to the Resources file value in the markup to see its value, or at the very least be able to right-click on it and select an option akin to Peek Definition to see the value, but as far as I can tell there is no such option.

Is there any easy way to view a value in a Resources file from references to it in code that I'm missing? Or a VS extension which would add this functionality (I've looked but can't find one)?

字符串资源可视化程序扩展在代码中内联使用时显示字符串资源(.resx)的文本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM