using Phonebook.Services; namespace Phonebook { public partial class AppShell : Shell { public AppShell() { InitializeComponent(); } private async void MenuItem_OnClicked(object? sender, EventArgs e) { await IPlatformApplication.Current!.Services.GetService()!.ExportToXlsx(); } private async void ImportButton_OnClicked(object? sender, EventArgs e) { var service = IPlatformApplication.Current!.Services.GetService()!; Shell.Current.FlyoutIsPresented = false; await service.ImportFromLocalContact(); } } }