Files
Phonebook/AppShell.xaml.cs
2026-04-09 13:10:02 +03:00

25 lines
689 B
C#

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<ContactService>()!.ExportToXlsx();
}
private async void ImportButton_OnClicked(object? sender, EventArgs e)
{
var service = IPlatformApplication.Current!.Services.GetService<ContactService>()!;
Shell.Current.FlyoutIsPresented = false;
await service.ImportFromLocalContact();
}
}
}