2

I am facing a problem with implementing a share target contract in a Windows 8 store application.

I am doing a file upload in the share target. After clicking on my share button I start with:

_shareArgs.ShareOperation.ReportStarted();
_shareArgs.ShareOperation.ReportSubmittedBackgroundTask();

Followe by uplaoding the files and awaiting their tasks. After that I call:

ShareOperation.ReportCompleted

When I call reportcompleted with the dispatcher the share cotnract doesn't throw an exception as long as the UI is kept open. without dispatcher it crashes with :

The operation cannot be completed because the window is being closed. (Exception from HRESULT: 0x802A0201)

When to UI is closed it always crashes with this exception.

The exception is thrown add the closing brackets of the buttonclick event handler.

Any Ideas on this one?

4

1 に答える 1