private void Doc_Tap(object sender, System.Windows.Input.GestureEventArgs e) { // Create a temporary document that will be renamed in the next window string tempPath = FileUtils.GetNumberedDocumentPath("Untitled", _currentDirectory.Path.PathString); Document newDocument = new Document(new PathStr(tempPath)) { IsTemp = true }; FileUtils.CreateDocument(newDocument.Path.Parent.PathString, newDocument.DisplayName); newDocument.NavToRename(NavigationService, this); }
private void Doc_Tap(object sender, System.Windows.Input.GestureEventArgs e) { using (IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication()) { // Create a temporary document that will be renamed in the next window string tempName = "." + Utils.GetUniqueName(_currentDirectory, isf); Document newDocument = new Document(_currentDirectory, tempName + ".txt") { IsTemp = true }; IsolatedStorageFileStream fs = isf.CreateFile(newDocument.Path.PathString); fs.Close(); newDocument.NavToRename(NavigationService); } }