Please consider WP8 libraries

Jan 30, 2013 at 3:48 AM

..easy enough to download the source and upgrade the projects (plus remove Tuple class which has now been included in WP8) - but would be handy if it came part of the existing download.


Feb 4, 2013 at 9:48 AM
I'm willing to look into this when I find the time. When I have news, I'll post it here.
Mar 1, 2013 at 2:40 PM
Edited Mar 1, 2013 at 2:47 PM
I am building a WP8/7.1 multi-targeted project and Sterling works perfectly without any additional fiddling around; just pulled down the Nuget package and boom, done. I only use it in my shared Core library (which is referenced by the background agent, WP71 project, and WP80 project).

It would be nice if there was built-in async support but it wasn't hard to wrap SaveAsync into a Task-based method. I don't have my code in front of me, but it goes like this:
public Task SaveAsync<T>(IList<T> instances, CancellationToken cancelToken) {
    var worker = _db.SaveAsync(instances);
    var tcs = new TaskCompletionSource<object>();

    // Cancellation
    worker.SupportsCancellation = true;

    // Register abort task

    // Setup handler
    Func<object, WorkCompletedEventArgs> handler;

    handler = (s, e) => {
        // Detach
        worker.WorkCompleted -= handler;

        // Canceled? Task will throw TaskCanceledException so ignore
        if (e.Canceled) {

        // Set exception if there was one
        if (e.Error !=  null) {

        // Set task result
        return tcs.TrySetResult(e.Result);

    // Attach handler
    worker.WorkCompleted += handler;

    // Start

    return tcs.Task;
I wrote this off the top of my head so I'm sure there are some signature problems but it gives you an idea. I'll post my full working code when I get home and maybe it can be added to the recipes (or it'll be moot once Sterling is updated to support Tasks natively).
Mar 1, 2013 at 4:09 PM
A version of Sterling that supports Windows Phone 8 and WinRT is coming that will have a full suite of asynchronous APIs.
Mar 1, 2013 at 8:58 PM
Jun 27, 2013 at 6:43 AM
What about WP8 support - any news about that?
Jun 27, 2013 at 1:55 PM
Jun 28, 2013 at 9:21 AM
Jul 1, 2013 at 7:34 PM
I noticed that v2 doesn't look like it supports Silverlight. Does this mean v1.6.x is essentially done?
Jul 2, 2013 at 7:03 AM
As far as I know, v2 will be getting the most attention and development going forward. v1.6.x could get a bugfix here and there (depending on available time and resources). But for the greatest part, v1.6 is usable and stable.