简体   繁体   English

从XAML切换到Xamarin.Forms中的代码隐藏的Visual Studio热键

[英]Visual Studio hotkey to switch from XAML to code-behind in Xamarin.Forms

I have looked for an answer and I found shift+F7 Or F7 but none of them works. 我一直在寻找答案,但我发现shift+F7F7但是它们都不起作用。 When I press F7 I get this error : 当我按F7此错误:

There is no editor available for C:\\MySolution\\text\\Mytest.xaml 没有可用于C:\\ MySolution \\ text \\ Mytest.xaml的编辑器

Make sure the application for the file type (.xaml) is installed. 确保已安装文件类型(.xaml)的应用程序。

I am running visual studio 2017. 我正在运行Visual Studio 2017。

安装CodeMaid,然后按CTRL+M, ,

have you tried, right clicking a xaml file and "open with..." to ensure there is a xaml editor defined in visual studio? 您是否尝试过,右键单击xaml文件并“使用...打开”以确保在Visual Studio中定义了xaml编辑器?

F7 works for me, though I did right click and "open with..." on xaml files the other week to get visual studio to use the correct xaml editor so I had intellisense in the xaml files. F7为我工作,尽管前一周我右键单击xaml文件并“用...打开”,以使Visual Studio使用正确的xaml编辑器,因此我在xaml文件中具有了智能感知功能。

Try CTRL + ALT + F7 . 尝试按CTRL + ALT + F7 Works for me for Pages , but not for Application . 适用于我的Pages ,但不适用于Application Probably because of Resharper. 可能是因为“锐利者”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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