Files
modernkeepass/ModernKeePass/Views/MainPageFrames/ImportExportPage.xaml.cs
BONNEVILLE Geoffroy 6f96e698ec Created Import/Export page (stub)
Changed some dependency properties from Interfaces to implementations
Used CanExecute on Commands
2018-08-02 17:40:30 +02:00

36 lines
986 B
C#

using System;
using Windows.Storage.Pickers;
using Windows.UI.Xaml;
// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
namespace ModernKeePass.Views
{
/// <summary>
/// The import/export page.
/// </summary>
public sealed partial class ImportExportPage
{
public ImportExportPage()
{
InitializeComponent();
}
private async void ImportFileButton_OnClick(object sender, RoutedEventArgs e)
{
var picker =
new FileOpenPicker
{
ViewMode = PickerViewMode.List,
SuggestedStartLocation = PickerLocationId.DocumentsLibrary
};
picker.FileTypeFilter.Add(".csv");
// Application now has read/write access to the picked file
var file = await picker.PickSingleFileAsync();
if (file == null) return;
}
}
}