menu

Windows Store app Development Snack: Async & Sharing

Here is an interesting issue, you need to implement a Share Source but to do the sharing you need it to be an async call. So what do you do? You can add the async & await modifiers but it won’t work correctly. The solution is to use the deferral which is given to you in the arguments of the event and when you are done you call the Complete method on it to indicate that you are done with all the async goodness:

Comments

[...] list of some of these controls, along with some suggested ways to cope with their loss…”Windows Store app Development Snack: Async & Sharing (Robert MacLean)“Here is an interesting issue, you need to implement a Share Source but to do [...]

[...] thing that happens is we get a deferral object (similar to what was explained in Async & Sharing) since we need to use async in the background task. Now we go to the RoamingSettings values to get [...]