-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
feat(Window): Allow to persist content of Clipboard after App close #16778
base: master
Are you sure you want to change the base?
feat(Window): Allow to persist content of Clipboard after App close #16778
Conversation
fd72ec4
to
04b4e0c
Compare
You can test this PR using the following package version. |
/// <param name="data">A data object (an object that implements <see cref="IDataObject"/>) to place on the system Clipboard.</param> | ||
/// <param name="copy"><c>true</c> to leave the data on the system Clipboard when the application exits; false to clear the data from the system Clipboard when the application exits.</param> | ||
/// <exception cref="System.ArgumentNullException"><paramref name="data"/> is null.</exception> | ||
Task SetDataObjectAsync(IDataObject data, bool copy); |
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.
I think correct API would be Clipboard.FlushAsync()
which can be more reliably supported on other platforms without unnecessary throwing an exception.
Especially since we can't guarantee actual copying (or even less - not copying dataobject) on all platforms.
This reverts commit 04b4e0c.
You can test this PR using the following package version. |
What does the pull request do?
Add FlushAsync method
What is the current behavior?
It is not supported by any platform
What is the updated/expected behavior with this PR?
Permanently adds data to the Clipboard on the Windows platform, does nothing on other platforms.
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Part of
#15411