Sam*_*Sam 4 c# cross-platform visual-studio xamarin xamarin.forms
我正在尝试在主页上加载带有单击事件的类,但它给了我以下错误:
参数 1:无法从“LocalDataAccess.recipe1”转换为“Xamarin.Forms.Page”
这是我的代码:
private async void recipe_Clicked(object sender, EventArgs e) {
await Navigation.PushAsync(new recipe1());
}
Run Code Online (Sandbox Code Playgroud)
小智 6
recipe1应该使用Xamarin.Formsand Inheritfrom ContentPage,所以你应该在 上执行以下操作recipe1:
using Xamarin.Forms;
class Recipe1:ContentPage\xe2\x80\x93 迈克·达尔维什 "
这工作很好!
\n| 归档时间: |
|
| 查看次数: |
5831 次 |
| 最近记录: |