Reputation: 1794
My Win RT app tries to get the content in the clipboard whenever the content changes. Problem is, when I open my application in snapped view along with some other native application and do a ctrl+v in other application, my app crashes with Unauthorized access exception:
The application crashed: System.UnauthorizedAccessException: Access is denied.
at Windows.ApplicationModel.DataTransfer.Clipboard.GetContent()
Is it because my application is in the background?
Upvotes: 1
Views: 646
Reputation: 21889
Correct. The app has access to the clipboard only when the app is in the foreground.
The app can remember that the clipboard changed and get the updated contents when the user reactivates the app.
Upvotes: 1