WP7 – Simple Network Opt-in Implementation

I’m giving the users of my WP7 app the ability to save their data to a central server and per the developer guidelines I need to get permission from the user to do so.  Wasn’t sure how to do this at first but I remembered that MessageBox works with WP7. 

So here is my implementation:


<CheckBox x:Name="SaveDataToServer" IsChecked="{Binding SaveDataToServerAutomatically, Mode=TwoWay}" />

ViewModel –

public bool SaveDataToServerAutomatically
        return _applicationSettings.SaveDataToServerAutomatically;
        var autoSave = value;
        if (autoSave)
            autoSave = MessageBoxResult.OK == MessageBox.Show("Are you sure you want to send you data across the web and save it to a central server?",
                "Send Location Data Consent",
        _applicationSettings.SaveDataToServerAutomatically = autoSave;

What do you think?  Any better ideas?  Please leave comments.

Leave a Reply