-
Notifications
You must be signed in to change notification settings - Fork 619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New Clipboard & FilePicker samples #1135
New Clipboard & FilePicker samples #1135
Conversation
@chingucoding let me know what you think of this new sample 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really like adding these kinds of samples!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great samples, only thing we could improve would be renaming the TextBlocks that show the output and maybe highlight the file(s)/folder that was picked? Maybe make it cursive?
var textBox = ((sender as Button).Parent as StackPanel) | ||
.FindName("FileContentTextBox") as TextBox; | ||
using (var stream = await file.OpenStreamForWriteAsync()) | ||
{ | ||
using (var tw = new StreamWriter(stream)) | ||
{ | ||
tw.WriteLine(textBox?.Text); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Formatting
if (file != null) | ||
{ | ||
// Prevent updates to the remote version of the file until we finish making changes and call CompleteUpdatesAsync. | ||
CachedFileManager.DeferUpdates(file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line seems to crash on my machine, @gregwoo-microsoft does this also happen on your machine?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works fine for me. What kind of error are you getting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a new sample to showcase how to use the Clipboard
Description
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes