13 Xamarin UI
Xamarin UI
Xamarin.Forms provides a number of different page navigation experiences, depending upon the Page type being used.
Navigation
NavigationPage
Starting up
MainPage = new NavigationPage(new Page1Xaml());
Pushing
await Navigation.PushAsync(new Page2Xaml());
Poping
await Navigation.PopAsync();
Pop to start
await Navigation.PopToRootAsync();
Data in navigation
Passing data to next page
- Via constructor
- Via BindingContext
Receive data back - callbacks
In page B:
1 2 |
|
In page A:
1 2 |
|
Manipulate stack
1 |
|
Database - EF Core
EF Core
EF Core is now possible out of box!
- Microsoft.EntityFrameworkCore.Sqlite
In dbcontext constructor call
1 2 3 |
|
In OnConfiguring figure out path for sqlite file
1 2 |
|
EF Core - ios
Entity Framework Core uses reflection to invoke functions which the Xamarin.iOS linker may strip out while in Release mode configurations.
Two possible ways how to solve:
- add
--linkskip System.Core
to the Additional mtouch arguments in the iOS Build options - set the Xamarin.iOS Linker behavior to
Don't Link
in the iOS Build options