通过生成工作室Xamarin快捷的方法 [英] Generate a method via Xamarin Studio Shortcut

查看:261
本文介绍了通过生成工作室Xamarin快捷的方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Visual Studio,一旦你双击它,它为你自动生成相应的方法。



不过,最近我使用的是Mac操作系统和Xamarin Studio的启动,并想知道是否有一个相同的快捷方式,产生相同的功能。



  myListView.ItemClick + = mListView_Click; 



当您双击挖掘在Visual Studio自动创建下面的方法。但我不知道Xamarin Studio中。

 无效mListView_Click(对象发件人,AdapterView.ItemClickEventArgs E)
$ { b $ b Console.WriteLine(你好);
}


解决方案

打开源代码分析这是启用(内Xamarin Studio中的首选项部分):





重新启动Xamarin工作室,这才会生效。您现在应该能够自动生成就像在Visual Studio中的事件处理程序:





另外,写出来的方法全名,单击右键,选择的修正的那么的创建方法的:


I was using Visual studio and once you double tap it, it generates the corresponding method for you automatically.

However, recently I have started using Mac operating system and Xamarin Studio and would like to know whether or not there is a same shortcut to generate same functionality.

myListView.ItemClick += mListView_Click;

The following method created automatically in Visual Studio when you double tapped. But I do not know in Xamarin Studio.

void mListView_Click(object sender, AdapterView.ItemClickEventArgs e)
{
  Console.WriteLine ("Hello");
}

解决方案

Turn on source code analysis for this to be enabled (within the preferences section of Xamarin Studio):

Restart Xamarin Studio for this to take effect. You should now be able to auto-generate event handlers like in Visual Studio:

Alternatively, write out the method name in full, right click, select Fix then Create Method:

这篇关于通过生成工作室Xamarin快捷的方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆