1
私は単純なマルチスクリーンアプリケーションを作成しようとしています。Xamarin:メソッドに正しい署名がありません
Content Page
とbutton
を追加しました。
MapPage.xaml.cs
:
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class MapPage : ContentPage
{
public MapPage()
{
InitializeComponent();
}
void ShowMap(object s, EventArgs e)
{
}
}
MapPage.xaml
:
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:App14"
x:Class="App14.MapPage">
<ContentPage.Content>
<StackLayout>
<Label Text="Welcome to Xamarin Forms!" />
<Button Text="show map"
Clicked="ShowMap"/>
</StackLayout>
</ContentPage.Content>
</ContentPage>
私はエラーを取得しています:ShowMap Method does not have correct signature
私が間違っているのか?
チェックに
private
(指定されていない場合のデフォルト)からイベントハンドラは、これはあなたの問題を解決するのに役立ちます場合:[https://stackoverflow.com/questions/38067982/button-does - 署名なし - 正しい - 署名 - xamarin](https://stackoverflow.com/questions/38067982/button-does-not-have-the-correct-signature-xamarin) – Habeeb