ciao!
il mio XAML di base è questo (MainPage.xaml):
ho indicato dove ottengo l'errore.codice:<?xml version="1.0" encoding="utf-8"?> <MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:views="clr-namespace:Book.Views" x:Class="Book.Views.MainPage"> <MasterDetailPage.Master> <views:MenuPage /> </MasterDetailPage.Master> <MasterDetailPage.Detail> <NavigationPage> <NavigationPage.Icon> <OnPlatform x:TypeArguments="FileImageSource"> <On Platform="iOS" Value="tab_feed.png" /> </OnPlatform> </NavigationPage.Icon> <x:Arguments> <views:ItemsPage /> --> ERRORE </x:Arguments> </NavigationPage> </MasterDetailPage.Detail> </MasterDetailPage>
quwsto errore lo ottengo da quando ho aggiunto un parametro al costruttore di ItemsPage:
l'errore di compilazione che ottengo è questo:codice:namespace Book.Views { [XamlCompilation(XamlCompilationOptions.Compile)] public partial class ItemsPage : ContentPage { ItemsViewModel viewModel; public ItemsPage(string strFile) { InitializeComponent(); BindingContext = viewModel = new ItemsViewModel(strFile); } } }
qualche idea??codice:MainPage.xaml: Error: The given key 'Xamarin.Forms.Xaml.ElementNode' was not present in the dictionary.

Rispondi quotando