假设我的应用程序只有一个页面,并且该页面有十个按钮,每个按钮都有自己的Click =“ method”,其中每个按钮的“ method”不同。没有光标或光标每次都按F12的命令,而是将在C#文档中生成所有方法的命令或快捷方式?
为清楚起见进行编辑:我正在XAML文件中编写
<Button x:Name="Button1" Content="Button 1" Click="whatever1" />
<Button x:Name="Button2" Content="Button 2" Click="whatever2" />
<Button x:Name="Button3" Content="Button 3" Click="whatever3" />
<Button x:Name="Button4" Content="Button 4" Click="whatever4" />
<Button x:Name="Button5" Content="Button 5" Click="whatever5" />
我想要一个插入
的快捷方式whatever1(object sender, RoutedEventArgs e)
{
}
whatever2(object sender, RoutedEventArgs e)
{
}
whatever3(object sender, RoutedEventArgs e)
{
}
whatever4(object sender, RoutedEventArgs e)
{
}
whatever5(object sender, RoutedEventArgs e)
{
}
自动在C#代码中。控件不一定是按钮,这只是一个示例。