private async void button_Click(object sender, RoutedEventArgs e) { StorageFolder videoLib = Windows.Storage.KnownFolders.VideosLibrary; StorageFile video = await videoLib.GetFileAsync(@"" + previewPath); var upload = new VideoFile { Title = previewPath }; await InsertVideoItem(upload); }
private async Task InsertVideoItem(VideoFile todoItem) { // This code inserts a new TodoItem into the database. When the operation completes // and Mobile App backend has assigned an Id, the item is added to the CollectionView. await videoTable.InsertAsync(todoItem); items.Add(todoItem); //await SyncAsync(); // offline sync }